https://git.reactos.org/?p=reactos.git;a=commitdiff;h=840fe4d6acf3e2899b6bb5...
commit 840fe4d6acf3e2899b6bb59a243985af91579325 Author: Jérôme Gardou jerome.gardou@reactos.org AuthorDate: Thu Oct 22 15:12:02 2020 +0200 Commit: Jérôme Gardou zefklop@users.noreply.github.com CommitDate: Thu Oct 22 18:07:27 2020 +0200
[CMAKE] Introduce the REACTOS_MODULE_TYPE target property
And set it in set_module_type function --- CMakeLists.txt | 7 +++++++ sdk/cmake/CMakeMacros.cmake | 3 +++ 2 files changed, 10 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt index e0ffe31e9d6..3f56a025651 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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" diff --git a/sdk/cmake/CMakeMacros.cmake b/sdk/cmake/CMakeMacros.cmake index e3ed4a00545..26337a0713e 100644 --- a/sdk/cmake/CMakeMacros.cmake +++ b/sdk/cmake/CMakeMacros.cmake @@ -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()