mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-24 02:19:41 +00:00
Fix target_include_directories not available on semi-modern platforms (Issue 181)
This commit is contained in:
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>)
|
||||
target_include_directories(cryptopp-static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/cryptopp>)
|
||||
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>)
|
||||
target_include_directories(cryptopp-shared PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include/cryptopp>)
|
||||
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
Block a user