Files
qt6-migration-pipeline/Lts/Common/LtsBotan/CMakeLists.txt
T

13 lines
697 B
CMake
Executable File

find_package(Botan2)
if (BOTAN_FOUND AND CMAKE_VERSION VERSION_GREATER 3.15.9) # botan doesn't use cmake, make it a cmake target | imported targets don't work correctly with 3.10
add_library(LtsBotan STATIC IMPORTED GLOBAL)
set_target_properties(LtsBotan PROPERTIES IMPORTED_LOCATION ${BOTAN_LIBRARIES})
set_target_properties(LtsBotan PROPERTIES INCLUDE_DIRECTORIES ${BOTAN_INCLUDE_DIRS})
target_compile_definitions(LtsBotan INTERFACE BOTAN_FOUND)
target_include_directories(LtsBotan SYSTEM INTERFACE ${BOTAN_INCLUDE_DIRS})
set(LTS_BOTAN LtsBotan)
message(STATUS "BOTAN_INCLUDE_DIRS = ${BOTAN_INCLUDE_DIRS}, BOTAN_LIBRARIES = ${BOTAN_LIBRARIES}, LTS_BOTAN = ${LTS_BOTAN}")
endif()