diff --git a/CMakeLists.txt b/CMakeLists.txt index 2829ce9f142..a72450b1abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,10 +166,6 @@ set(CMAKE_UNITY_BUILD_BATCH_SIZE 40) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${lto}) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF) -if(client OR server) - add_subdirectory(src) -endif() - if(g15 AND WIN32) add_subdirectory("helpers/g15helper") endif() @@ -197,6 +193,10 @@ if(plugins AND client) add_subdirectory(plugins) endif() +if(client OR server) + add_subdirectory(src) +endif() + add_subdirectory(auxiliary_files) if(packaging) diff --git a/helpers/g15helper/CMakeLists.txt b/helpers/g15helper/CMakeLists.txt index 16a85418d60..a3e8313b3ad 100644 --- a/helpers/g15helper/CMakeLists.txt +++ b/helpers/g15helper/CMakeLists.txt @@ -12,8 +12,6 @@ set(G15HELPER_PLIST "${CMAKE_BINARY_DIR}/g15helper.plist") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/g15helper.plist.in" "${G15HELPER_PLIST}") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/g15helper.rc.in" "${G15HELPER_RC}") -get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR) - add_executable(g15-helper WIN32 "${CMAKE_SOURCE_DIR}/auxiliary_files/mumble.appcompat.manifest" "${G15HELPER_RC}" diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9cd3216f82b..da3be138a33 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -9,6 +9,7 @@ if(retracted-plugins) message(STATUS "Including retracted plugins") endif() +add_custom_target(plugins ALL) set(AVAILABLE_PLUGINS "") @@ -123,5 +124,5 @@ foreach(CURRENT_PLUGIN IN LISTS AVAILABLE_PLUGINS) install(TARGETS ${CURRENT_PLUGIN} LIBRARY DESTINATION "${MUMBLE_INSTALL_PLUGINDIR}" COMPONENT mumble_client) endif() - add_dependencies(mumble ${CURRENT_PLUGIN}) + add_dependencies(plugins ${CURRENT_PLUGIN}) endforeach() diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt index fa41283bcca..bcbe1b8d72a 100644 --- a/src/mumble/CMakeLists.txt +++ b/src/mumble/CMakeLists.txt @@ -880,17 +880,25 @@ if(overlay) "Overlay_win.cpp" "Overlay_win.h" ) + + add_dependencies(mumble overlay) else() if(APPLE) target_sources(mumble_client_object_lib PRIVATE "Overlay_macx.mm") else() target_sources(mumble_client_object_lib PRIVATE "Overlay_unix.cpp") endif() + + add_dependencies(mumble overlay_gl) endif() target_compile_definitions(mumble_client_object_lib PUBLIC "USE_OVERLAY") endif() +if(plugins) + add_dependencies(mumble plugins) +endif() + if(xboxinput) target_sources(mumble_client_object_lib PRIVATE @@ -919,6 +927,7 @@ if(g15) "G15LCDEngine_helper.h" ) target_include_directories(mumble_client_object_lib PUBLIC "${CMAKE_SOURCE_DIR}/helpers") + add_dependencies(mumble g15-helper) else() find_library(LIB_G15DAEMON_CLIENT "g15daemon_client") if(LIB_G15DAEMON_CLIENT-NOTFOUND)