cleaned up LTO detection

This commit is contained in:
Erik Frojdh
2020-04-23 08:23:36 +02:00
parent eb257154c6
commit 337e56d9bf
4 changed files with 13 additions and 7 deletions

View File

@ -42,11 +42,13 @@ add_library(slsSupportLib SHARED
${HEADERS}
)
check_ipo_supported(RESULT result)
if(result)
if(SLS_LTO_AVAILABLE)
set_property(TARGET slsSupportLib PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
endif()
target_include_directories(slsSupportLib PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"