mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
[CMAKE] unset EXPORT_SYMBOL for modules and shared libraries
We don't use that
This commit is contained in:
parent
23373acbb9
commit
979972b900
2 changed files with 20 additions and 0 deletions
|
@ -19,6 +19,7 @@ add_executable(ntoskrnl
|
||||||
ntoskrnl.rc
|
ntoskrnl.rc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
|
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
|
||||||
set_property(TARGET ntoskrnl PROPERTY ENABLE_EXPORTS TRUE)
|
set_property(TARGET ntoskrnl PROPERTY ENABLE_EXPORTS TRUE)
|
||||||
|
set_target_properties(ntoskrnl PROPERTIES DEFINE_SYMBOL "")
|
||||||
|
|
||||||
if(ARCH STREQUAL "i386")
|
if(ARCH STREQUAL "i386")
|
||||||
set_entrypoint(ntoskrnl KiSystemStartup 4)
|
set_entrypoint(ntoskrnl KiSystemStartup 4)
|
||||||
|
|
|
@ -524,6 +524,11 @@ if(NOT MSVC_IDE)
|
||||||
function(add_library name)
|
function(add_library name)
|
||||||
_add_library(${name} ${ARGN})
|
_add_library(${name} ${ARGN})
|
||||||
add_clean_target(${name})
|
add_clean_target(${name})
|
||||||
|
# cmake adds a module_EXPORTS define when compiling a module or a shared library. We don't use that.
|
||||||
|
get_target_property(_type ${name} TYPE)
|
||||||
|
if (_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY)
|
||||||
|
set_target_properties(${name} PROPERTIES DEFINE_SYMBOL "")
|
||||||
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(add_executable name)
|
function(add_executable name)
|
||||||
|
@ -549,6 +554,11 @@ elseif(USE_FOLDER_STRUCTURE)
|
||||||
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE)
|
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE)
|
||||||
set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
|
set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
|
||||||
endif()
|
endif()
|
||||||
|
# cmake adds a module_EXPORTS define when compiling a module or a shared library. We don't use that.
|
||||||
|
get_target_property(_type ${name} TYPE)
|
||||||
|
if (_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY)
|
||||||
|
set_target_properties(${name} PROPERTIES DEFINE_SYMBOL "")
|
||||||
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(add_executable name)
|
function(add_executable name)
|
||||||
|
@ -556,6 +566,15 @@ elseif(USE_FOLDER_STRUCTURE)
|
||||||
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE)
|
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE)
|
||||||
set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
|
set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
else()
|
||||||
|
function(add_library name)
|
||||||
|
_add_library(${name} ${ARGN})
|
||||||
|
# cmake adds a module_EXPORTS define when compiling a module or a shared library. We don't use that.
|
||||||
|
get_target_property(_type ${name} TYPE)
|
||||||
|
if (_type MATCHES SHARED_LIBRARY|MODULE_LIBRARY)
|
||||||
|
set_target_properties(${name} PROPERTIES DEFINE_SYMBOL "")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue