1
0
forked from blue/squawk
squawk/CMakeLists.txt

52 lines
1.1 KiB
CMake
Raw Normal View History

2019-03-29 14:54:34 +00:00
cmake_minimum_required(VERSION 3.0)
project(squawk)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
2019-03-29 14:54:34 +00:00
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
include(GNUInstallDirs)
2019-03-29 14:54:34 +00:00
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5LinguistTools)
2019-03-29 14:54:34 +00:00
set(squawk_SRC
main.cpp
global.cpp
exception.cpp
signalcatcher.cpp
2019-03-29 14:54:34 +00:00
)
set(TS_FILES
translations/squawk.ru.ts
)
qt5_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations ALL DEPENDS ${QM_FILES})
qt5_add_resources(RCC resources/resources.qrc)
add_executable(squawk ${squawk_SRC} ${RCC})
2019-03-29 14:54:34 +00:00
target_link_libraries(squawk Qt5::Widgets)
add_subdirectory(ui)
add_subdirectory(core)
option(SYSTEM_QXMPP "Use system qxmpp lib" OFF)
if(NOT SYSTEM_QXMPP)
add_subdirectory(external/qxmpp)
endif()
2019-03-29 14:54:34 +00:00
target_link_libraries(squawk squawkUI)
target_link_libraries(squawk squawkCORE)
2019-04-12 15:22:10 +00:00
target_link_libraries(squawk uuid)
2019-03-29 14:54:34 +00:00
add_dependencies(${CMAKE_PROJECT_NAME} translations)
2019-03-29 14:54:34 +00:00
# Install the executable
install(TARGETS squawk DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/Macaw/Squawk/l10n)