From 840fe4d6acf3e2899b6bb59a243985af91579325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 22 Oct 2020 15:12:02 +0200 Subject: [PATCH] [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()