Skip to content

Commit

Permalink
make params data into C code instead of CSV file (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett authored Oct 1, 2022
1 parent 24b6750 commit 56aa231
Show file tree
Hide file tree
Showing 4 changed files with 1,017 additions and 1,205 deletions.
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ src/specunpack.c src/util.c src/g2cxml.c src/g2cparams.c)

set_property(TARGET ${lib_name} PROPERTY C_STANDARD 11)

# Copy the data file with the NOAA abbreviations.
set(DATA_FILE noaa_grib2_params.csv)
configure_file(src/noaa_grib2_params.csv ${CMAKE_CURRENT_BINARY_DIR}/${DATA_FILE} COPYONLY)

# Remember the location of the data file.
add_compile_definitions(DATADIR="${CMAKE_CURRENT_BINARY_DIR}")
add_compile_definitions(INSTALL_DATADIR="${CMAKE_INSTALL_FULL_LIBDIR}")

# Find libxml2.
find_package(LibXml2 2.9.0 REQUIRED)
target_link_libraries(${lib_name} PRIVATE ${LIBXML2_LIBRARIES})
Expand Down Expand Up @@ -180,8 +172,6 @@ install(
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/${DATA_FILE}
DESTINATION ${CMAKE_INSTALL_LIBDIR})

# Package config
include(CMakePackageConfigHelpers)
Expand Down
Loading

0 comments on commit 56aa231

Please sign in to comment.