diff options
Diffstat (limited to 'dev-cpp/cppgir/files/cppgir-0_p20230606-system-expected-lite.patch')
-rw-r--r-- | dev-cpp/cppgir/files/cppgir-0_p20230606-system-expected-lite.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/dev-cpp/cppgir/files/cppgir-0_p20230606-system-expected-lite.patch b/dev-cpp/cppgir/files/cppgir-0_p20230606-system-expected-lite.patch new file mode 100644 index 000000000000..096ed39dc03b --- /dev/null +++ b/dev-cpp/cppgir/files/cppgir-0_p20230606-system-expected-lite.patch @@ -0,0 +1,37 @@ +Use system-wide copy of expected-lite + +--- cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e.orig/CMakeLists.txt ++++ cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e/CMakeLists.txt +@@ -76,14 +76,8 @@ + "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/override>" + ) + +-set(EXPECTED_LITE_INCLUDE "expected-lite/include") +-if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${EXPECTED_LITE_INCLUDE}/nonstd/expected.hpp) +- target_include_directories(gi INTERFACE +- "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${EXPECTED_LITE_INCLUDE}>" +- ) +-else () +- message (FATAL_ERROR "missing submodule expected-lite") +-endif () ++find_package(expected-lite REQUIRED) ++target_link_libraries(gi INTERFACE nonstd::expected-lite) + + include(FindPkgConfig) + pkg_check_modules(GOBJECT gobject-2.0) +@@ -241,8 +235,6 @@ + # headers + install(DIRECTORY gi override + DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/${PROJECT_NAME}) +-install(DIRECTORY ${EXPECTED_LITE_INCLUDE}/nonstd +- DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/${PROJECT_NAME}/gi) + + # doc + install(FILES README.md docs/cppgir.md +--- cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e.orig/cmake/cppgir-config.cmake ++++ cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e/cmake/cppgir-config.cmake +@@ -1 +1,4 @@ ++include(CMakeFindDependencyMacro) ++find_dependency(expected-lite) ++ + include("${CMAKE_CURRENT_LIST_DIR}/cppgir-targets.cmake") |