Skip to content

Commit

Permalink
[fast-cpp-csv-parser] 2021-01-03
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Aug 29, 2024
1 parent b1859b8 commit 57adc34
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ports/fast-cpp-csv-parser/FindFastCppCsvParser.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
include(FindPackageHandleStandardArgs)

find_path(FastCppCsvParser_INCLUDE_DIR
NAMES csv.h
PATH_SUFFIXES fast-cpp-csv-parser
HINTS ${FastCppCsvParser_ROOT_DIR}/include ${FastCppCsvParser_INCLUDEDIR}
)

find_package_handle_standard_args(FastCppCsvParser
FOUND_VAR FastCppCsvParser_FOUND
REQUIRED_VARS FastCppCsvParser_INCLUDE_DIR
)

mark_as_advanced(FastCppCsvParser_ROOT_DIR FastCppCsvParser_INCLUDE_DIR)

if(FastCppCsvParser_FOUND AND NOT TARGET FastCppCsvParser::csv)
add_library(FastCppCsvParser::csv INTERFACE IMPORTED)
set_target_properties(FastCppCsvParser::csv PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${FastCppCsvParser_INCLUDE_DIR}"
)
endif()
15 changes: 15 additions & 0 deletions ports/fast-cpp-csv-parser/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# header-only library

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ben-strasser/fast-cpp-csv-parser
REF 75600d0b77448e6c410893830df0aec1dbacf8e3
SHA512 aab418e98eb895dabd6369b186b7a55beddb84b89e358395a9f125829074916eff9086d80f9cd342d1bfd91acacc7103875c970a84164b75fff259cc93729285
HEAD_REF master
)

file(COPY "${SOURCE_PATH}/csv.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindFastCppCsvParser.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake)

# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
8 changes: 8 additions & 0 deletions ports/fast-cpp-csv-parser/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "fast-cpp-csv-parser",
"version-date": "2021-01-03",
"port-version": 2,
"description": "A small, easy-to-use and fast header-only library for reading comma separated value (CSV) files",
"homepage": "https://github.com/ben-strasser/fast-cpp-csv-parser",
"license": "BSD-3-Clause"
}

0 comments on commit 57adc34

Please sign in to comment.