Skip to content

Commit

Permalink
Update source CMake config file (#553)
Browse files Browse the repository at this point in the history
Added target_include_directories for ${CMAKE_CURRENT_BINARY_DIR} so
that the local build src directory is always the first include
directory that would contain the grib2.h.

Co-authored-by: Eric Engle <[email protected]>
  • Loading branch information
EricEngle-NOAA and EricEngle-NOAA authored Nov 6, 2024
1 parent c8122bd commit 7347daf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ endif()
# static and shared libraries.
add_library(${lib_name}_objlib OBJECT ${src_files})
set_property(TARGET ${lib_name}_objlib PROPERTY C_STANDARD 11)
target_include_directories(${lib_name}_objlib PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
if(BUILD_SHARED_LIBS)
set_property(TARGET ${lib_name}_objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
endif()
Expand Down

0 comments on commit 7347daf

Please sign in to comment.