mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-21 15:29:56 +02:00
Merge pull request #553 from olerem/j1939_vehicle_position
J1939 vehicle position
This commit is contained in:
@@ -18,6 +18,12 @@ endif()
|
||||
|
||||
# Add an option to enable treating warnings as errors
|
||||
option(ENABLE_WERROR "Treat all compiler warnings as errors" OFF)
|
||||
option(ENABLE_GPS "Enable GPS support" OFF)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
if(ENABLE_GPS)
|
||||
pkg_check_modules(GPS REQUIRED libgps)
|
||||
endif()
|
||||
|
||||
if(ENABLE_WERROR)
|
||||
add_compile_options(-Werror)
|
||||
@@ -71,6 +77,10 @@ set(PROGRAMS_J1939_TIMEDATE
|
||||
j1939-timedate-cli
|
||||
)
|
||||
|
||||
set(PROGRAMS_J1939_VEHICLE_POSITION
|
||||
j1939-vehicle-position-srv
|
||||
)
|
||||
|
||||
set(PROGRAMS_ISOBUSFS
|
||||
isobusfs-srv
|
||||
isobusfs-cli
|
||||
@@ -195,6 +205,24 @@ if(NOT ANDROID)
|
||||
j1939-timedate-srv
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
if(ENABLE_GPS)
|
||||
set(PUBLIC_HEADER_J1939_VEHICLE_POSITION
|
||||
j1939_vehicle_position/j1939_vehicle_position_cmn.h
|
||||
)
|
||||
|
||||
add_executable(j1939-vehicle-position-srv
|
||||
j1939_vehicle_position/j1939_vehicle_position_srv.c
|
||||
)
|
||||
|
||||
target_link_libraries(j1939-vehicle-position-srv
|
||||
PRIVATE can j1939 ${GPS_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
j1939-vehicle-position-srv
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
add_library(can STATIC
|
||||
|
||||
Reference in New Issue
Block a user