Browse Source

modules: updated FindCorrade.cmake.

pull/331/head
Vladimír Vondruš 7 years ago
parent
commit
aa293440e0
  1. 20
      modules/FindCorrade.cmake

20
modules/FindCorrade.cmake

@ -282,6 +282,9 @@ endif()
# Read flags from configuration
file(READ ${_CORRADE_CONFIGURE_FILE} _corradeConfigure)
set(_corradeFlags
# WARNING: CAREFUL HERE, the string(FIND) succeeds even if a subset is
# found -- so e.g. looking for TARGET_GL will match TARGET_GLES2 as well.
# So far that's not a problem, but might become an issue for new flags.
MSVC2015_COMPATIBILITY
MSVC2017_COMPATIBILITY
BUILD_DEPRECATED
@ -406,10 +409,23 @@ foreach(_component ${Corrade_FIND_COMPONENTS})
endif()
# No special setup for Containers library
# No special setup for Interconnect library
# Interconnect library
if(_component STREQUAL Interconnect)
# Disable /OPT:ICF on MSVC, which merges functions with identical
# contents and thus breaks signal comparison
if(CORRADE_TARGET_WINDOWS AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(CMAKE_VERSION VERSION_LESS 3.13)
set_property(TARGET Corrade::${_component} PROPERTY
INTERFACE_LINK_LIBRARIES "-OPT:NOICF,REF")
else()
set_property(TARGET Corrade::${_component} PROPERTY
INTERFACE_LINK_OPTIONS "/OPT:NOICF,REF")
endif()
endif()
# PluginManager library
if(_component STREQUAL PluginManager)
elseif(_component STREQUAL PluginManager)
# At least static build needs this
if(CORRADE_TARGET_UNIX)
set_property(TARGET Corrade::${_component} APPEND PROPERTY

Loading…
Cancel
Save