Keep vanetza-idf in obu-firmware, so a plain clone builds the firmware
obu-firmware builds against the vanetza-idf C-ITS library, which until now came from the colleague's microbu-esp32c5 tree beside the repository and was not tracked here, so a clone of this repository could not build the firmware it ships. The library alone is now part of obu-firmware, as obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from there by default; -DVANETZA_IDF_DIR still points the build elsewhere. The rest of the colleague's tree (their own VAM firmware, PKI tooling, station-link Python tools, the V2X2MAP bridge) stays out of this repository and gitignored; nothing is pushed to their repository. NOTES.md, docs/06, TODO.md and the pcap verifier's usage line point at the new location.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
option(GeographicLib_PREFER_PACKAGE_CONFIG "Prefer CMake config mode" ON)
|
||||
mark_as_advanced(GeographicLib_PREFER_PACKAGE_CONFIG)
|
||||
|
||||
if(GeographicLib_PREFER_PACKAGE_CONFIG)
|
||||
find_package(GeographicLib ${GeographicLib_FIND_VERSION} QUIET CONFIG)
|
||||
if (GeographicLib_FOUND)
|
||||
message(STATUS "GeographicLib: using found CMake configuration")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "GeographicLib: using lookup code by Vanetza")
|
||||
|
||||
find_path(GeographicLib_INCLUDE_DIR NAMES GeographicLib/Config.h DOC "GeographicLib include directory")
|
||||
find_library(GeographicLib_LIBRARY_RELEASE NAMES Geographic GeographicLib DOC "GeographicLib library (release)")
|
||||
find_library(GeographicLib_LIBRARY_DEBUG NAMES Geographic_d GeographicLib_d DOC "GeographicLib library (debug)")
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(GeographicLib)
|
||||
|
||||
if(GeographicLib_INCLUDE_DIR)
|
||||
file(STRINGS ${GeographicLib_INCLUDE_DIR}/GeographicLib/Config.h _config_version REGEX "GEOGRAPHICLIB_VERSION_STRING")
|
||||
string(REGEX MATCH "\"([0-9.]+)\"$" _match_version ${_config_version})
|
||||
set(GeographicLib_VERSION_STRING ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GeographicLib
|
||||
REQUIRED_VARS GeographicLib_INCLUDE_DIR GeographicLib_LIBRARY
|
||||
FOUND_VAR GeographicLib_FOUND
|
||||
VERSION_VAR GeographicLib_VERSION_STRING)
|
||||
|
||||
if(GeographicLib_FOUND AND NOT TARGET GeographicLib::GeographicLib)
|
||||
add_library(GeographicLib::GeographicLib UNKNOWN IMPORTED)
|
||||
set_target_properties(GeographicLib::GeographicLib PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GeographicLib_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${GeographicLib_LIBRARY}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
|
||||
if(EXISTS "${GeographicLib_LIBRARY_RELEASE}")
|
||||
set_property(TARGET GeographicLib::GeographicLib APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(GeographicLib::GeographicLib PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${GeographicLib_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(EXISTS "${GeographicLib_LIBRARY_DEBUG}")
|
||||
set_property(TARGET GeographicLib::GeographicLib APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(GeographicLib::GeographicLib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${GeographicLib_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GeographicLib_INCLUDE_DIR GeographicLib_LIBRARY)
|
||||
set(GeographicLib_INCLUDE_DIRS ${GeographicLib_INCLUDE_DIR})
|
||||
# GeographicLib_LIBRARIES is set by SelectLibraryConfigurations
|
||||
Reference in New Issue
Block a user