Use system-wide copy of expected-lite --- cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e.orig/CMakeLists.txt +++ cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e/CMakeLists.txt @@ -76,14 +76,8 @@ "$" ) -set(EXPECTED_LITE_INCLUDE "expected-lite/include") -if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${EXPECTED_LITE_INCLUDE}/nonstd/expected.hpp) - target_include_directories(gi INTERFACE - "$" - ) -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")