refactor(Cmake): add support build selected applications and tools (#11836)

This commit is contained in:
Kargatum
2022-05-31 17:05:39 +07:00
committed by GitHub
parent 40a5eef152
commit 4fbec972a8
56 changed files with 1006 additions and 622 deletions

View File

@@ -12,11 +12,8 @@
CU_RUN_HOOK(BEFORE_SCRIPTS_LIBRARY)
message("")
# Make the script module list available in the current scope
GetScriptModuleList(SCRIPT_MODULE_LIST)
GetModuleSourceList(MODULES_MODULE_LIST)
# Make the native install offset available in this scope
GetInstallOffset(INSTALL_OFFSET)
@@ -33,18 +30,6 @@ else()
set(SCRIPTS_DEFAULT_LINKAGE "disabled")
endif()
# Sets the MODULES_${SOURCE_MODULE} variables
# when using predefined templates for script building
# like dynamic, static
# Sets MODULES_DEFAULT_LINKAGE
if(MODULES MATCHES "dynamic")
set(MODULES_DEFAULT_LINKAGE "dynamic")
elseif(MODULES MATCHES "static")
set(MODULES_DEFAULT_LINKAGE "static")
else()
set(MODULES_DEFAULT_LINKAGE "disabled")
endif()
# Sets SCRIPTS_USE_WHITELIST
# Sets SCRIPTS_WHITELIST
if(SCRIPTS MATCHES "minimal")
@@ -93,8 +78,8 @@ list(SORT SCRIPT_GRAPH_KEYS)
list(REMOVE_DUPLICATES SCRIPT_GRAPH_KEYS)
# Display the script graph
message("* Script configuration (${SCRIPTS}):
|")
message("* Script configuration (${SCRIPTS}):")
message(" |")
foreach(SCRIPT_GRAPH_KEY ${SCRIPT_GRAPH_KEYS})
if(NOT SCRIPT_GRAPH_KEY STREQUAL "disabled")
@@ -108,10 +93,8 @@ foreach(SCRIPT_GRAPH_KEY ${SCRIPT_GRAPH_KEYS})
message(" |")
endforeach()
message("")
# Base sources which are used by every script project
if(USE_SCRIPTPCH)
if (USE_SCRIPTPCH)
set(PRIVATE_PCH_HEADER ScriptPCH.h)
endif()