Do post configure function(s) more generically

This commit is contained in:
Tim Angus 2025-09-18 14:25:52 +01:00
parent d8bf83931d
commit de76c8feea
5 changed files with 6 additions and 6 deletions

View File

@ -81,4 +81,5 @@ include(client)
include(basegame)
include(missionpack)
include(post_configure)
include(installer)

View File

@ -108,7 +108,3 @@ foreach(LIBRARY IN LISTS CLIENT_DEPLOY_LIBRARIES)
# install() requires a relative path hence:
$<PATH:RELATIVE_PATH,$<TARGET_FILE_DIR:${CLIENT_BINARY}>,${CMAKE_BINARY_DIR}/$<CONFIG>>)
endforeach()
if(POST_CLIENT_CONFIGURE_FUNCTION)
cmake_language(CALL ${POST_CLIENT_CONFIGURE_FUNCTION})
endif()

View File

@ -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

View File

@ -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)

View File

@ -0,0 +1,3 @@
foreach(POST_CONFIGURE_FUNCTION IN LISTS POST_CONFIGURE_FUNCTIONS)
cmake_language(CALL ${POST_CONFIGURE_FUNCTION})
endforeach()