diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/botan/fix-cmake-usage.patch | |
Diffstat (limited to 'vcpkg/ports/botan/fix-cmake-usage.patch')
| -rw-r--r-- | vcpkg/ports/botan/fix-cmake-usage.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/vcpkg/ports/botan/fix-cmake-usage.patch b/vcpkg/ports/botan/fix-cmake-usage.patch new file mode 100644 index 0000000..e1c8f59 --- /dev/null +++ b/vcpkg/ports/botan/fix-cmake-usage.patch @@ -0,0 +1,79 @@ +diff --git a/src/build-data/botan-config.cmake.in b/src/build-data/botan-config.cmake.in +index 8d14c4e..cfc9277 100644 +--- a/src/build-data/botan-config.cmake.in ++++ b/src/build-data/botan-config.cmake.in +@@ -65,27 +65,36 @@ if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_FOUND AND NOT ${${CMAKE_FIND_PACKAGE_NAME} + return() + endif() + +-# botan-config.cmake lives in "${_Botan_PREFIX}/lib/cmake/Botan-X": traverse up to $_Botan_PREFIX ++# botan-config.cmake lives in "${_Botan_PREFIX}/share/botan": traverse up to $_Botan_PREFIX + set(_Botan_PREFIX "${CMAKE_CURRENT_LIST_DIR}") + get_filename_component(_Botan_PREFIX "${_Botan_PREFIX}" DIRECTORY) + get_filename_component(_Botan_PREFIX "${_Botan_PREFIX}" DIRECTORY) +-get_filename_component(_Botan_PREFIX "${_Botan_PREFIX}" DIRECTORY) + + %{if build_static_lib} + if(NOT TARGET Botan::Botan-static) + add_library(Botan::Botan-static STATIC IMPORTED) + set_target_properties(Botan::Botan-static + PROPERTIES +- IMPORTED_LOCATION "${_Botan_PREFIX}/lib/%{static_lib_name}" +- INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include/botan-%{version_major}" ++ INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include" + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + INTERFACE_LINK_OPTIONS "SHELL:%{cxx_abi_flags}") ++ if(EXISTS "${_Botan_PREFIX}/debug/lib/%{static_lib_name}") ++ set_property(TARGET Botan::Botan-static APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) ++ set_target_properties(Botan::Botan-static PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${_Botan_PREFIX}/debug/lib/%{static_lib_name}" ++ ) ++ endif() ++ set_property(TARGET Botan::Botan-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) ++ set_target_properties(Botan::Botan-static PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${_Botan_PREFIX}/lib/%{static_lib_name}" ++ ) + endif() + %{endif} + + %{if implib_name} +-set(_Botan_implib "${_Botan_PREFIX}/lib/%{implib_name}") +-set(_Botan_shared_lib "${_Botan_PREFIX}/bin/%{shared_lib_name}") ++set(_Botan_implib "${_Botan_PREFIX}/lib/%{implib_name}") ++set(_Botan_implib_debug "${_Botan_PREFIX}/debug/lib/%{implib_name}") ++set(_Botan_shared_lib "${_Botan_PREFIX}/bin/%{shared_lib_name}") + %{endif} + %{unless implib_name} + set(_Botan_implib "") +@@ -100,10 +109,28 @@ if(NOT TARGET Botan::Botan) + add_library(Botan::Botan SHARED IMPORTED) + set_target_properties(Botan::Botan + PROPERTIES +- IMPORTED_LOCATION "${_Botan_shared_lib}" +- IMPORTED_IMPLIB "${_Botan_implib}" +- INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include/botan-%{version_major}" ++ INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include" + INTERFACE_LINK_OPTIONS "SHELL:%{cxx_abi_flags}") ++ if(EXISTS "${_Botan_PREFIX}/debug/lib/%{shared_lib_name}") ++ set_property(TARGET Botan::Botan APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) ++ set_target_properties(Botan::Botan PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${_Botan_PREFIX}/debug/bin/%{shared_lib_name}" ++ ) ++ if(NOT _Botan_implib STREQUAL "") ++ set_target_properties(Botan::Botan PROPERTIES ++ IMPORTED_IMPLIB_DEBUG ${_Botan_implib_debug} ++ ) ++ endif() ++ endif() ++ set_property(TARGET Botan::Botan APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) ++ set_target_properties(Botan::Botan PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${_Botan_PREFIX}/bin/%{shared_lib_name}" ++ ) ++ if(NOT _Botan_implib STREQUAL "") ++ set_target_properties(Botan::Botan PROPERTIES ++ IMPORTED_IMPLIB_RELEASE ${_Botan_implib} ++ ) ++ endif() + set_property(TARGET Botan::Botan APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) + set_target_properties(Botan::Botan + PROPERTIES |