https://git.reactos.org/?p=reactos.git;a=commitdiff;h=957e566a236b75ba2547a…
commit 957e566a236b75ba2547af6305a5edf59c5eca7a
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Dec 4 01:08:20 2021 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Dec 4 01:17:32 2021 +0100
[APITESTS][NTVDM][SPOOLSV] Add the missing ENABLE_EXPORTS property as these EXE
targets have function exports.
This became a requirement, following a previous CMake update.
Otherwise the built EXEs would not export their intended functions.
Addendum to commit d8e92b5a (see PR #1335)
CORE-15406
[LOADCONFIG] The GCC rant had nothing to do with GCC, but everything with CMake...
[SPOOLSV] Add the missing exported stubs.
---
modules/rostests/apitests/loadconfig/CMakeLists.txt | 12 ++++++------
modules/rostests/apitests/ntdll/CMakeLists.txt | 5 +++++
modules/rostests/apitests/shell32/CMakeLists.txt | 5 +++++
sdk/cmake/CMakeMacros.cmake | 6 ++++--
subsystems/mvdm/ntvdm/CMakeLists.txt | 5 +++++
win32ss/printing/base/spoolsv/CMakeLists.txt | 13 +++++++++++--
6 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/modules/rostests/apitests/loadconfig/CMakeLists.txt
b/modules/rostests/apitests/loadconfig/CMakeLists.txt
index d4327e5622d..ac40bc53bb4 100644
--- a/modules/rostests/apitests/loadconfig/CMakeLists.txt
+++ b/modules/rostests/apitests/loadconfig/CMakeLists.txt
@@ -7,16 +7,16 @@ list(APPEND SOURCE
loadconfig.h)
add_executable(loadconfig_apitest ${SOURCE} testlist.c
${CMAKE_CURRENT_BINARY_DIR}/loadconfig_apitest.def)
-target_link_libraries(loadconfig_apitest wine ${PSEH_LIB})
-set_module_type(loadconfig_apitest win32cui)
-add_importlibs(loadconfig_apitest msvcrt kernel32 ntdll)
-#add_pch(loadconfig_apitest loadconfig.h SOURCE)
-add_rostests_file(TARGET loadconfig_apitest)
-# Tell GCC again that we are really interested in exporting symols (who would have
figured that we want to use the .def we specified before?)
set_target_properties(loadconfig_apitest
PROPERTIES
ENABLE_EXPORTS TRUE
DEFINE_SYMBOL "")
+target_link_libraries(loadconfig_apitest wine ${PSEH_LIB})
+set_module_type(loadconfig_apitest win32cui)
+add_importlibs(loadconfig_apitest msvcrt kernel32 ntdll)
+#add_pch(loadconfig_apitest loadconfig.h SOURCE)
+add_rostests_file(TARGET loadconfig_apitest)
+
fixup_load_config(loadconfig_apitest)
diff --git a/modules/rostests/apitests/ntdll/CMakeLists.txt
b/modules/rostests/apitests/ntdll/CMakeLists.txt
index 1e69ecf4900..a50b1898a76 100644
--- a/modules/rostests/apitests/ntdll/CMakeLists.txt
+++ b/modules/rostests/apitests/ntdll/CMakeLists.txt
@@ -110,6 +110,11 @@ add_executable(ntdll_apitest
testdata.rc
${CMAKE_CURRENT_BINARY_DIR}/ntdll_apitest.def)
+set_target_properties(ntdll_apitest
+ PROPERTIES
+ ENABLE_EXPORTS TRUE
+ DEFINE_SYMBOL "")
+
target_link_libraries(ntdll_apitest wine uuid ${PSEH_LIB})
set_module_type(ntdll_apitest win32cui)
add_importlibs(ntdll_apitest msvcrt advapi32 kernel32 ntdll)
diff --git a/modules/rostests/apitests/shell32/CMakeLists.txt
b/modules/rostests/apitests/shell32/CMakeLists.txt
index 7a175032619..9ebf9404a2d 100644
--- a/modules/rostests/apitests/shell32/CMakeLists.txt
+++ b/modules/rostests/apitests/shell32/CMakeLists.txt
@@ -41,6 +41,11 @@ add_executable(shell32_apitest
resource.rc
${CMAKE_CURRENT_BINARY_DIR}/shell32_apitest.def)
+set_target_properties(shell32_apitest
+ PROPERTIES
+ ENABLE_EXPORTS TRUE
+ DEFINE_SYMBOL "")
+
target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB} cpprt atl_classes)
set_module_type(shell32_apitest win32cui)
add_importlibs(shell32_apitest user32 gdi32 shell32 ole32 oleaut32 advapi32 shlwapi
msvcrt kernel32 ntdll)
diff --git a/sdk/cmake/CMakeMacros.cmake b/sdk/cmake/CMakeMacros.cmake
index 7e4cb21cbe0..b72b40b3cd9 100644
--- a/sdk/cmake/CMakeMacros.cmake
+++ b/sdk/cmake/CMakeMacros.cmake
@@ -669,8 +669,10 @@ function(set_module_type MODULE TYPE)
if(TYPE STREQUAL kernel)
# Kernels are executables with exports
- set_property(TARGET ${MODULE} PROPERTY ENABLE_EXPORTS TRUE)
- set_target_properties(${MODULE} PROPERTIES DEFINE_SYMBOL "")
+ set_target_properties(${MODULE}
+ PROPERTIES
+ ENABLE_EXPORTS TRUE
+ DEFINE_SYMBOL "")
endif()
if(${TYPE} STREQUAL win32ocx)
diff --git a/subsystems/mvdm/ntvdm/CMakeLists.txt b/subsystems/mvdm/ntvdm/CMakeLists.txt
index ff102d88576..aa01e0727d3 100644
--- a/subsystems/mvdm/ntvdm/CMakeLists.txt
+++ b/subsystems/mvdm/ntvdm/CMakeLists.txt
@@ -73,6 +73,11 @@ add_executable(ntvdm
ntvdm.rc
${CMAKE_CURRENT_BINARY_DIR}/ntvdm.def)
+set_target_properties(ntvdm
+ PROPERTIES
+ ENABLE_EXPORTS TRUE
+ DEFINE_SYMBOL "")
+
add_pch(ntvdm ntvdm.h SOURCE)
set_module_type(ntvdm win32cui UNICODE IMAGEBASE 0x0F000000)
target_link_libraries(ntvdm fast486 ${PSEH_LIB})
diff --git a/win32ss/printing/base/spoolsv/CMakeLists.txt
b/win32ss/printing/base/spoolsv/CMakeLists.txt
index 1506f4d5dc3..6602eba9fab 100644
--- a/win32ss/printing/base/spoolsv/CMakeLists.txt
+++ b/win32ss/printing/base/spoolsv/CMakeLists.txt
@@ -22,9 +22,18 @@ list(APPEND SOURCE
rpcstubs.c
spoolfile.c
xcv.c
- ${CMAKE_CURRENT_BINARY_DIR}/winspool_s.c)
+ ${CMAKE_CURRENT_BINARY_DIR}/winspool_s.c
+ ${CMAKE_CURRENT_BINARY_DIR}/spoolsv_stubs.c)
-add_executable(spoolsv ${SOURCE} spoolsv.rc)
+add_executable(spoolsv
+ ${SOURCE}
+ spoolsv.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/spoolsv.def)
+
+set_target_properties(spoolsv
+ PROPERTIES
+ ENABLE_EXPORTS TRUE
+ DEFINE_SYMBOL "")
if(USE_CLANG_CL)
target_compile_options(spoolsv PRIVATE "-Wno-cast-calling-convention")