diff --git a/CMakeLists.txt b/CMakeLists.txt index defc7685..95403e5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,4 +81,5 @@ include(client) include(basegame) include(missionpack) +include(post_configure) include(installer) diff --git a/cmake/client.cmake b/cmake/client.cmake index 67256dfd..41dc9360 100644 --- a/cmake/client.cmake +++ b/cmake/client.cmake @@ -108,7 +108,3 @@ foreach(LIBRARY IN LISTS CLIENT_DEPLOY_LIBRARIES) # install() requires a relative path hence: $,${CMAKE_BINARY_DIR}/$>) endforeach() - -if(POST_CLIENT_CONFIGURE_FUNCTION) - cmake_language(CALL ${POST_CLIENT_CONFIGURE_FUNCTION}) -endif() diff --git a/cmake/platforms/emscripten.cmake b/cmake/platforms/emscripten.cmake index b7380530..30fd9105 100644 --- a/cmake/platforms/emscripten.cmake +++ b/cmake/platforms/emscripten.cmake @@ -35,7 +35,7 @@ if(EMSCRIPTEN_PRELOAD_FILE) list(APPEND CLIENT_LINK_OPTIONS --preload-file "${BASEGAME}") endif() -set(POST_CLIENT_CONFIGURE_FUNCTION deploy_shell_files) +list(APPEND POST_CONFIGURE_FUNCTIONS deploy_shell_files) function(deploy_shell_files) configure_file(${SOURCE_DIR}/web/client.html.in diff --git a/cmake/platforms/macos.cmake b/cmake/platforms/macos.cmake index a6f4ee4c..997d8225 100644 --- a/cmake/platforms/macos.cmake +++ b/cmake/platforms/macos.cmake @@ -19,7 +19,7 @@ set(CMAKE_OSX_ARCHITECTURES arm64;x86_64) if(BUILD_MACOS_APP) set(CLIENT_EXECUTABLE_OPTIONS MACOSX_BUNDLE) - set(POST_CLIENT_CONFIGURE_FUNCTION finish_macos_app) + list(APPEND POST_CONFIGURE_FUNCTIONS finish_macos_app) endif() function(finish_macos_app) diff --git a/cmake/post_configure.cmake b/cmake/post_configure.cmake new file mode 100644 index 00000000..e259f8dc --- /dev/null +++ b/cmake/post_configure.cmake @@ -0,0 +1,3 @@ +foreach(POST_CONFIGURE_FUNCTION IN LISTS POST_CONFIGURE_FUNCTIONS) + cmake_language(CALL ${POST_CONFIGURE_FUNCTION}) +endforeach()