X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2FCMakeLists.txt;h=130144b56c2a901976fd15b6d8b4b1bbcb823bd9;hp=24a6aa7accbe9efa089bfec6f2334ba51f1e2846;hb=12a6abcfe51ac66e8763b3caadaedcb47c2723f1;hpb=af9bfa0581dd3620f6fe300084262c55c7084046 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24a6aa7a..130144b5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,84 +1,14 @@ -# Builds the three main targets - add_subdirectory(common) -include_directories(BEFORE common) -if(BUILD_CORE) - add_subdirectory(core) - include_directories(BEFORE core) -endif() -if(BUILD_GUI) - add_subdirectory(client) - add_subdirectory(uisupport) - add_subdirectory(qtui) - include_directories(BEFORE client) - include_directories(BEFORE uisupport) - include_directories(BEFORE qtui) -endif() - -include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) # for version.gen - -# We need to initialize the appropriate resources, so let's give our main.cpp some hints -if (EMBED_DATA) - add_definitions(-DEMBED_DATA) -endif() - -# For KAboutData -if (WITH_KF5) - set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} KF5::CoreAddons) +add_subdirectory(main) +if (BUILD_CORE) + add_subdirectory(core) endif() - -# Needed for showing the cli option if appropriate -if (HAVE_SYSLOG) - add_definitions(-DHAVE_SYSLOG) -endif() - -if(WANT_CORE) - add_executable(quasselcore common/main.cpp ${CORE_DEPS} ${COMMON_DEPS}) - qt5_use_modules(quasselcore Core Network ${CORE_QT_MODULES}) - add_dependencies(quasselcore po) - set_target_properties(quasselcore PROPERTIES - COMPILE_FLAGS "-DBUILD_CORE" - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) - target_link_libraries(quasselcore mod_core mod_common ${COMMON_LIBRARIES} ${QUASSEL_SSL_LIBRARIES} ${QT_QTMAIN_LIBRARY}) - install(TARGETS quasselcore RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() - -if(WANT_QTCLIENT) - add_executable(quasselclient WIN32 common/main.cpp ${CLIENT_DEPS} ${COMMON_DEPS}) - qt5_use_modules(quasselclient Core Gui Network ${CLIENT_QT_MODULES}) - add_dependencies(quasselclient po) - set_target_properties(quasselclient PROPERTIES - COMPILE_FLAGS "-DBUILD_QTUI" - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) - target_link_libraries(quasselclient mod_qtui mod_uisupport mod_client mod_common ${COMMON_LIBRARIES} ${CLIENT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES} ${QT_QTMAIN_LIBRARY}) - install(TARGETS quasselclient RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() - -if(WANT_MONO) - add_executable(quassel WIN32 common/main.cpp qtui/monoapplication.cpp ${CLIENT_DEPS} ${CORE_DEPS} ${COMMON_DEPS}) - qt5_use_modules(quassel Core Gui Network ${CLIENT_QT_MODULES} ${CORE_QT_MODULES}) - add_dependencies(quassel po) - set_target_properties(quassel PROPERTIES - COMPILE_FLAGS "-DBUILD_MONO" - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) - target_link_libraries(quassel mod_qtui mod_uisupport mod_client mod_core mod_common ${COMMON_LIBRARIES} ${CLIENT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES} ${QT_QTMAIN_LIBRARY}) - install(TARGETS quassel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +if (BUILD_GUI) + add_subdirectory(client) + add_subdirectory(uisupport) + add_subdirectory(qtui) endif() -# Build bundles for MacOSX -if(APPLE) - add_custom_command(TARGET quasselclient POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makebundle.py - ${CMAKE_SOURCE_DIR} "Quassel Client" ../quasselclient) - add_custom_command(TARGET quassel POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makebundle.py - ${CMAKE_SOURCE_DIR} "Quassel" ../quassel) - if(DEPLOY) - add_custom_command(TARGET quasselclient POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Client .. qsvgicon) - add_custom_command(TARGET quasselcore POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Core ..) - add_custom_command(TARGET quassel POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Mono .. qsvgicon) - endif() +if (BUILD_TESTING) + add_subdirectory(test) endif()