mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
|
||||
set_property(TARGET ntoskrnl PROPERTY ENABLE_EXPORTS TRUE)
|
||||
set_target_properties(ntoskrnl PROPERTIES DEFINE_SYMBOL "")
|
||||
|
||||
if(ARCH STREQUAL "i386")
|
||||
set_entrypoint(ntoskrnl KiSystemStartup 4)
|
||||
|
|
|
@ -524,6 +524,11 @@ if(NOT MSVC_IDE)
|
|||
function(add_library name)
|
||||
_add_library(${name} ${ARGN})
|
||||
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()
|
||||
|
||||
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)
|
||||
set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
|
||||
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()
|
||||
|
||||
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)
|
||||
set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
|
||||
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()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||
|
|
Loading…
Reference in a new issue