Fix target_include_directories not available on semi-modern platforms (Issue 181)
parent
b0e9f4bebd
commit
0b56cf57b1
|
|
@ -131,15 +131,22 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||
set_target_properties(cryptopp-object PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
if (BUILD_STATIC)
|
||||
add_library(cryptopp-static STATIC $<TARGET_OBJECTS:cryptopp-object>)
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
target_include_directories(cryptopp-static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/cryptopp>)
|
||||
else()
|
||||
include_directories("${ROOT_SOURCE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_SHARED)
|
||||
add_library(cryptopp-shared SHARED $<TARGET_OBJECTS:cryptopp-object>)
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
target_include_directories(cryptopp-shared PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/cryptopp>)
|
||||
else()
|
||||
include_directories("${ROOT_SOURCE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
|
|
@ -252,4 +259,3 @@ endif()
|
|||
if(BUILD_DOCUMENTATION)
|
||||
install(DIRECTORY "${out_source_DOCS_DIR}" DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue