[CMAKE] Introduce the REACTOS_MODULE_TYPE target property

And set it in set_module_type function
This commit is contained in:
Jérôme Gardou 2020-10-22 15:12:02 +02:00 committed by Jérôme Gardou
parent c321d3e88b
commit 840fe4d6ac
2 changed files with 10 additions and 0 deletions

View file

@ -115,6 +115,13 @@ else()
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
# Add our own target properties
# General module definitions
define_property(TARGET PROPERTY REACTOS_MODULE_TYPE
BRIEF_DOCS "The type of this module"
FULL_DOCS [[
The type of this module.
One of "nativecui", "nativedll", "kernelmodedriver", "wdmdriver", "kerneldll", "win32cui", "win32gui", "win32dll", "win32ocx", "cpl" or "module"]])
# C++
define_property(TARGET PROPERTY WITH_CXX_EXCEPTIONS
BRIEF_DOCS "Enable C++ exceptions on this target"

View file

@ -567,6 +567,9 @@ function(set_module_type MODULE TYPE)
message(FATAL_ERROR "Unknown type ${TYPE} for module ${MODULE}")
endif()
# Set our target property
set_target_properties(${MODULE} PROPERTIES REACTOS_MODULE_TYPE ${TYPE})
if(DEFINED __subsystem)
set_subsystem(${MODULE} ${__subsystem})
endif()