mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[CMAKE] Allow INTERFACE libraries for MSVC IDEs
This commit is contained in:
parent
d6ea8659c8
commit
8b28f8d9ba
1 changed files with 9 additions and 7 deletions
|
@ -474,15 +474,17 @@ elseif(USE_FOLDER_STRUCTURE)
|
|||
|
||||
function(add_library name)
|
||||
_add_library(${name} ${ARGN})
|
||||
get_target_property(_target_excluded ${name} EXCLUDE_FROM_ALL)
|
||||
if(_target_excluded AND ${name} MATCHES "^lib.*")
|
||||
set_property(TARGET "${name}" PROPERTY FOLDER "Importlibs")
|
||||
else()
|
||||
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}")
|
||||
get_target_property(_type ${name} TYPE)
|
||||
if (NOT _type STREQUAL "INTERFACE_LIBRARY")
|
||||
get_target_property(_target_excluded ${name} EXCLUDE_FROM_ALL)
|
||||
if(_target_excluded AND ${name} MATCHES "^lib.*")
|
||||
set_property(TARGET "${name}" PROPERTY FOLDER "Importlibs")
|
||||
else()
|
||||
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()
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue