Skip to content

Commit

Permalink
Backport "Merge PR #6640: FIX(cmake): Don't set WORKING_DIRECTORY for…
Browse files Browse the repository at this point in the history
… ExternalProject_Add()" to 1.5.x (#6641)
  • Loading branch information
Hartmnt authored Nov 29, 2024
2 parents 64d954e + 04d5f56 commit 45b8241
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions helpers/g15helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 0 additions & 2 deletions overlay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ if(64_BIT AND MSVC)
"-Dversion=${PROJECT_VERSION}"
${CMAKE_SOURCE_DIR}/overlay
CMAKE_GENERATOR_PLATFORM "Win32"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
INSTALL_COMMAND ""
)
else()
Expand All @@ -194,7 +193,6 @@ if(64_BIT AND MSVC)
"-Dsymbols=${symbols}"
"-Dversion=${PROJECT_VERSION}"
${CMAKE_SOURCE_DIR}/overlay
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
INSTALL_COMMAND ""
)
endif()
Expand Down
3 changes: 2 additions & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if(retracted-plugins)
message(STATUS "Including retracted plugins")
endif()

add_custom_target(plugins ALL)

set(AVAILABLE_PLUGINS "")

Expand Down Expand Up @@ -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()
9 changes: 9 additions & 0 deletions src/mumble/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 45b8241

Please sign in to comment.