Created
May 10, 2022 20:45
-
-
Save dschulz/b4bd758784175f57ded0b61b660ab3ab to your computer and use it in GitHub Desktop.
add Botan2 library to a Qt6 project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Include FindBotan2.cmake in ${PROJECT_ROOT}/cmake | |
# https://github.com/rnpgp/rnp/blob/master/cmake/Modules/FindBotan2.cmake | |
# Then add this | |
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | |
find_package(Botan2 REQUIRED) | |
if(BOTAN2_VERSION VERSION_LESS "2.19.1") | |
message(FATAL_ERROR "Botan2 2.19.1 or higher is required") | |
endif() | |
include_directories(SYSTEM ${BOTAN2_INCLUDE_DIR}) | |
# Beneath the other target_link_libraries(...) lines | |
target_link_libraries(MyProjectName PRIVATE ${BOTAN2_LIBRARIES} ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment