28 lines
644 B
CMake
28 lines
644 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
set(NAME cand)
|
|
project(Cnomicon-Daemon)
|
|
set(TARGET ${NAME})
|
|
set(CMAKE_INSTALL_PREFIX ..)
|
|
|
|
# includes
|
|
include_directories(
|
|
/usr/include/libxml2
|
|
../include/libcan++ ../include/libgps++ ../include/libnet++ ../include)
|
|
link_directories(../lib)
|
|
link_libraries(can++ gps++ net++ net emb kmlbase kmldom kmlengine xml2 pthread rt)
|
|
|
|
# sources
|
|
set(SRCS
|
|
CanDaemon.cpp
|
|
CanListener.cpp
|
|
CanRxListener.cpp
|
|
CanTxGenerator.cpp
|
|
)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin)
|
|
|
|
# executables
|
|
add_executable(${TARGET} ${TARGET}.cpp ${SRCS})
|
|
|
|
install(TARGETS ${TARGET} DESTINATION sbin)
|