mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-06 02:30:26 -08:00
Some cmake improvements for modules
This commit is contained in:
parent
603753dfff
commit
12fa25c322
3 changed files with 29 additions and 7 deletions
|
|
@ -58,6 +58,19 @@ MACRO(CU_SET_CACHE name val)
|
|||
set(${name} ${val} CACHE INTERNAL "CU Var")
|
||||
ENDMACRO()
|
||||
|
||||
#
|
||||
# CU_LIST_ADD_CACHE
|
||||
#
|
||||
MACRO(CU_LIST_ADD_CACHE name val)
|
||||
|
||||
# avoid duplicates
|
||||
if (";${${name}};" MATCHES ";${val};")
|
||||
# nothing to do for now
|
||||
else()
|
||||
set(${name} ${val} ${${name}} CACHE INTERNAL "CU Var")
|
||||
endif()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
#
|
||||
# CU_SET_PATH
|
||||
|
|
@ -72,14 +85,19 @@ ENDMACRO()
|
|||
# CU_ADD_INC_PATH
|
||||
#
|
||||
MACRO(CU_ADD_INC_PATH val)
|
||||
set(CU_INC_PATHS
|
||||
${CU_INC_PATHS}
|
||||
${val}
|
||||
)
|
||||
|
||||
#update cache
|
||||
CU_SET_CACHE("CU_INC_PATHS" "${CU_INC_PATHS}")
|
||||
include_directories(${val})
|
||||
if (";${CU_INC_PATHS};" MATCHES ";${val};")
|
||||
# nothing to do for now
|
||||
else()
|
||||
set(CU_INC_PATHS
|
||||
${CU_INC_PATHS}
|
||||
${val}
|
||||
)
|
||||
|
||||
#update cache
|
||||
CU_SET_CACHE("CU_INC_PATHS" "${CU_INC_PATHS}")
|
||||
include_directories(${val})
|
||||
endif()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
# Enable precompiled headers when using the GCC compiler.
|
||||
|
||||
CU_RUN_HOOK(BEFORE_SCRIPTS_LIBRARY)
|
||||
|
||||
CU_SET_PATH("AC_SCRIPTS_DIR" "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
if (USE_SCRIPTPCH)
|
||||
|
|
@ -74,6 +76,7 @@ message(STATUS "SCRIPT PREPARATION COMPLETE")
|
|||
message("")
|
||||
|
||||
include_directories(
|
||||
${scripts_INCLUDE_DIRS}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Detour
|
||||
${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Recast
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ include_directories(
|
|||
${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Threading
|
||||
${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Utilities
|
||||
${CMAKE_SOURCE_DIR}/modules/acore/game-framework/src/Addons
|
||||
${game_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}/src/game
|
||||
${CMAKE_SOURCE_DIR}/src/game/Accounts
|
||||
${CMAKE_SOURCE_DIR}/src/game/Achievements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue