https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d8e92b5a0a791fda5bdd6…
commit d8e92b5a0a791fda5bdd68ed4b4d5a3e8ac00536
Author: Andrew Cook <ariscop(a)gmail.com>
AuthorDate: Sun Feb 3 22:57:20 2019 +1100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Feb 3 12:57:20 2019 +0100
Merge pull request #1335 from ariscop/CMP0065
Fixes for upstream cmake
---
CMakeLists.txt | 5 +++++
boot/freeldr/freeldr/CMakeLists.txt | 3 +++
dll/3rdparty/libtirpc/CMakeLists.txt | 1 -
ntoskrnl/CMakeLists.txt | 1 +
ntoskrnl/ntkrnlmp/CMakeLists.txt | 1 +
5 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 756b08f218..84b900c37e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,11 @@ if(POLICY CMP0058)
cmake_policy(SET CMP0058 OLD)
endif()
+if(POLICY CMP0065)
+ # Do not add flags to export symbols from executables without the ENABLE_EXPORTS
target property
+ cmake_policy(SET CMP0065 NEW)
+endif()
+
project(REACTOS)
# Versioning
diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt
index 14723b6c70..5d0bba0ba9 100644
--- a/boot/freeldr/freeldr/CMakeLists.txt
+++ b/boot/freeldr/freeldr/CMakeLists.txt
@@ -300,6 +300,9 @@ endif()
add_executable(freeldr_pe ${FREELDR_BASE_SOURCE})
add_executable(freeldr_pe_dbg EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE})
+set_property(TARGET freeldr_pe PROPERTY ENABLE_EXPORTS TRUE)
+set_property(TARGET freeldr_pe_dbg PROPERTY ENABLE_EXPORTS TRUE)
+
if(NOT MSVC AND SEPARATE_DBG)
set_target_properties(freeldr_pe PROPERTIES LINKER_LANGUAGE LDR_PE_HELPER)
set_target_properties(freeldr_pe_dbg PROPERTIES LINKER_LANGUAGE LDR_PE_HELPER)
diff --git a/dll/3rdparty/libtirpc/CMakeLists.txt b/dll/3rdparty/libtirpc/CMakeLists.txt
index 3d028925de..aaa4ac036c 100644
--- a/dll/3rdparty/libtirpc/CMakeLists.txt
+++ b/dll/3rdparty/libtirpc/CMakeLists.txt
@@ -39,7 +39,6 @@ list(APPEND SOURCE
src/gettimeofday.c
src/key_call.c
src/key_prot_xdr.c
- src/libtirpc.def
#src/makefile
#src/Makefile.am
src/mt_misc.c
diff --git a/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt
index c649eabb1c..d1ee38201d 100644
--- a/ntoskrnl/CMakeLists.txt
+++ b/ntoskrnl/CMakeLists.txt
@@ -18,6 +18,7 @@ add_executable(ntoskrnl
guid.c
ntoskrnl.rc
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
+set_property(TARGET ntoskrnl PROPERTY ENABLE_EXPORTS TRUE)
if(ARCH STREQUAL "i386")
set_entrypoint(ntoskrnl KiSystemStartup 4)
diff --git a/ntoskrnl/ntkrnlmp/CMakeLists.txt b/ntoskrnl/ntkrnlmp/CMakeLists.txt
index 385e862829..eebdd07510 100644
--- a/ntoskrnl/ntkrnlmp/CMakeLists.txt
+++ b/ntoskrnl/ntkrnlmp/CMakeLists.txt
@@ -16,6 +16,7 @@ add_executable(ntkrnlmp
${REACTOS_SOURCE_DIR}/ntoskrnl/guid.c
${REACTOS_SOURCE_DIR}/ntoskrnl/ntoskrnl.rc
${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
+set_property(TARGET ntkrnlmp PROPERTY ENABLE_EXPORTS TRUE)
add_target_compile_definitions(ntkrnlmp CONFIG_SMP)