diff --git a/CMakeLists.txt b/CMakeLists.txt index de538932..f3d47b23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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_include_directories(cryptopp-static PUBLIC $ $) + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) + target_include_directories(cryptopp-static PUBLIC $ $) + else() + include_directories("${ROOT_SOURCE_DIR}") + endif() endif() if (BUILD_SHARED) add_library(cryptopp-shared SHARED $) - target_include_directories(cryptopp-shared PUBLIC $ $) + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) + target_include_directories(cryptopp-shared PUBLIC $ $) + 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() -