mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Add support for CMake "required definitions" to modules and libraries.
This commit is contained in:
parent
82a36d8a32
commit
dca11afded
1 changed files with 28 additions and 0 deletions
|
|
@ -61,6 +61,32 @@ macro(addDebugDef def)
|
||||||
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "${def}")
|
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "${def}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# adds a required definition. Are processed on addExecutable or addStaticLib
|
||||||
|
macro(addRequiredDefinition def)
|
||||||
|
#message(STATUS "${PROJECT_NAME} : add def : ${def}")
|
||||||
|
LIST( APPEND ${PROJECT_NAME}_required_definition ${def} )
|
||||||
|
endmacro()
|
||||||
|
# adds a required debug definition. Are processed on addExecutable or addStaticLib
|
||||||
|
macro(addRequiredDebugDefinition def)
|
||||||
|
#message(STATUS "${PROJECT_NAME} : add def : ${def}")
|
||||||
|
LIST( APPEND ${PROJECT_NAME}_required_debug_definition ${def} )
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# add definitions to project
|
||||||
|
macro( _processProjectDefinition )
|
||||||
|
foreach( def ${${PROJECT_NAME}_required_definition} )
|
||||||
|
addDef( ${def} )
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach( def ${${PROJECT_NAME}_required_debug_definition} )
|
||||||
|
addDef( ${def} )
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
#clear required defs
|
||||||
|
set( ${PROJECT_NAME}_required_definition )
|
||||||
|
set( ${PROJECT_NAME}_required_debug_definition )
|
||||||
|
endmacro()
|
||||||
|
|
||||||
# adds an include path
|
# adds an include path
|
||||||
macro(addInclude incPath)
|
macro(addInclude incPath)
|
||||||
#message(STATUS "${PROJECT_NAME} : add include path : ${incPath}")
|
#message(STATUS "${PROJECT_NAME} : add include path : ${incPath}")
|
||||||
|
|
@ -196,6 +222,7 @@ macro(addStaticLib)
|
||||||
|
|
||||||
_processProjectLinks()
|
_processProjectLinks()
|
||||||
_processProjectLibrary()
|
_processProjectLibrary()
|
||||||
|
_processProjectDefinition()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# macro to add an executable
|
# macro to add an executable
|
||||||
|
|
@ -214,6 +241,7 @@ macro(addExecutable)
|
||||||
|
|
||||||
_processProjectLinks()
|
_processProjectLinks()
|
||||||
_processProjectLibrary()
|
_processProjectLibrary()
|
||||||
|
_processProjectDefinition()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(setupVersionNumbers)
|
macro(setupVersionNumbers)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue