diff options
Diffstat (limited to 'graphics/libopendrive/files/patch-CMakeLists.txt')
-rw-r--r-- | graphics/libopendrive/files/patch-CMakeLists.txt | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/graphics/libopendrive/files/patch-CMakeLists.txt b/graphics/libopendrive/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..32b6609c0b7b --- /dev/null +++ b/graphics/libopendrive/files/patch-CMakeLists.txt @@ -0,0 +1,62 @@ +--- CMakeLists.txt.orig 2025-07-04 08:27:24 UTC ++++ CMakeLists.txt +@@ -20,22 +20,10 @@ include(CTest) + endif() + + include(CTest) +-include(FetchContent) + include(GNUInstallDirs) + +-FetchContent_Declare( +- pugixml +- GIT_REPOSITORY https://github.com/zeux/pugixml.git +- GIT_TAG v1.14 +-) +-FetchContent_MakeAvailable(pugixml) +- +-FetchContent_Declare( +- Catch2 +- GIT_REPOSITORY https://github.com/catchorg/Catch2.git +- GIT_TAG v3.4.0 +-) +-FetchContent_MakeAvailable(Catch2) ++find_package(pugixml 1.14 REQUIRED) ++find_package(Catch2 3.4.0 REQUIRED) + include(Catch) + + set(SOURCES +@@ -59,19 +47,18 @@ set(SOURCES + src/RoadObject.cpp + src/RoadSignal.cpp + src/RoutingGraph.cpp +- ${pugixml_SOURCE_DIR}/src/pugixml.cpp + ) + + add_library(OpenDrive ${SOURCES}) + target_include_directories( + OpenDrive PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> +- $<BUILD_INTERFACE:${pugixml_SOURCE_DIR}/src> + ) + + add_executable(tests tests/test.cpp) +-target_link_libraries(tests PRIVATE OpenDrive Catch2::Catch2WithMain) ++target_link_libraries(tests PRIVATE OpenDrive pugixml::pugixml Catch2::Catch2WithMain) + catch_discover_tests(tests WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests) + + install( +@@ -80,12 +67,6 @@ install( + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +-) +-install( +- FILES +- ${pugixml_SOURCE_DIR}/src/pugixml.hpp +- ${pugixml_SOURCE_DIR}/src/pugiconfig.hpp +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(TARGETS OpenDrive EXPORT OpenDriveConfig) |