Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Gems/RobotecSplineTools/3rdParty/Findcsv-parser.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Fetches the "CSV for C++" library's generated single-header release asset
# (vincentlaucsb/csv-parser) at configure time.
if (TARGET 3rdParty::csv-parser)
return()
endif()

set(CSV_PARSER_VERSION "5.3.0")
set(CSV_PARSER_URL "https://github.com/vincentlaucsb/csv-parser/releases/download/${CSV_PARSER_VERSION}/csv.hpp")
set(CSV_PARSER_SHA256 "330b0d8950ff8b566ae726c022e2396f1dcdee36cb9ad6f6c1badc8febbf4319")

include(FetchContent)
FetchContent_Declare(
csv-parser
URL ${CSV_PARSER_URL}
URL_HASH SHA256=${CSV_PARSER_SHA256}
DOWNLOAD_NO_EXTRACT TRUE
)
FetchContent_MakeAvailable(csv-parser)

message(STATUS "SplineTools Gem uses csv-parser-${CSV_PARSER_VERSION} (MIT License) ${CSV_PARSER_URL}")

add_library(csv-parser INTERFACE)
target_include_directories(csv-parser INTERFACE ${csv-parser_SOURCE_DIR})

# The header defaults CSV_ENABLE_THREADS to 1, which pulls in std::thread/pthread.
target_compile_definitions(csv-parser INTERFACE CSV_ENABLE_THREADS=0)

get_property(this_gem_root GLOBAL PROPERTY "@GEMROOT:${gem_name}@")
ly_get_engine_relative_source_dir(${this_gem_root} relative_this_gem_root)
set_property(TARGET csv-parser PROPERTY FOLDER "${relative_this_gem_root}/External")

add_library(3rdParty::csv-parser ALIAS csv-parser)

set(csv-parser_FOUND TRUE)
1 change: 1 addition & 0 deletions Gems/RobotecSplineTools/3rdParty/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The "CSV for C++" library is Open Source, MIT-licensed contribution by Vincent La, available at https://github.com/vincentlaucsb/csv-parser. It is fetched at CMake configure time via FetchContent (see Findcsv-parser.cmake).
1 change: 0 additions & 1 deletion Gems/RobotecSplineTools/Code/3rdParty/NOTICE.txt

This file was deleted.

Loading
Loading