pageldev / libOpenDRIVE

Small, lightweight C++ library for handling OpenDRIVE files
Apache License 2.0
388 stars 136 forks source link

question:FetchContent Don't work #59

Closed Euraxluo closed 1 year ago

Euraxluo commented 1 year ago
FetchContent_Declare(OpenDrive URL https://github.com/grepthat/libOpenDRIVE/archive/refs/tags/0.2.0.tar.gz)
FetchContent_MakeAvailable(OpenDrive)
pageldev commented 1 year ago

Sry, this is not related to libOpenDRIVE, this is either an issue with your CMake or accessing GitHub

Euraxluo commented 1 year ago

I should be how to integrate into my project

Euraxluo commented 1 year ago
FetchContent_Declare(OpenDrive URL https://github.com/grepthat/libOpenDRIVE/archive/refs/tags/0.3.0.tar.gz
        SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libOpenDRIVE)
FetchContent_MakeAvailable(OpenDrive)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libOpenDRIVE)
    set(OpenDRIVE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libOpenDRIVE/include")
    set(OpenDRIVE_THIRDPARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libOpenDRIVE/thirdparty")
    include_directories(SYSTEM ${OpenDRIVE_INCLUDE_DIR})
    include_directories(SYSTEM ${OpenDRIVE_THIRDPARTY_DIR})
endif ()