Skip to content

Commit

Permalink
Fix include path for ./parsers
Browse files Browse the repository at this point in the history
It was caused by #46.
Since src/parsers directory wasn't in include path,
it leads to the following error while compiling libnmea:
src/parsers/gpgga.h:7:10: fatal error: nmea.h: No such file or directory
    7 | #include <nmea.h>
  • Loading branch information
yhsb2k committed May 15, 2022
1 parent 9f1f24f commit 55f6811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -80,7 +80,7 @@ if (NMEA_BUILD_STATIC_LIB)
src/nmea/parser_static.c
src/parsers/parse.c)
set_target_properties(nmea PROPERTIES VERSION ${LIBNMEA_VERSION})
target_include_directories(nmea INTERFACE src)
target_include_directories(nmea INTERFACE src/nmea src/parsers)
if (UNIX)
target_link_libraries(nmea ${CMAKE_DL_LIBS})
endif()
Expand All @@ -97,7 +97,7 @@ if (NMEA_BUILD_SHARED_LIB)

add_library(nmea_shared SHARED ${NMEA_SRC})
set_target_properties(nmea_shared PROPERTIES VERSION ${LIBNMEA_VERSION})
target_include_directories(nmea_shared INTERFACE src)
target_include_directories(nmea_shared INTERFACE src/nmea src/parsers)

if (UNIX)
target_link_libraries(nmea_shared ${CMAKE_DL_LIBS})
Expand Down

0 comments on commit 55f6811

Please sign in to comment.