19 lines
483 B
CMake
19 lines
483 B
CMake
|
cmake_minimum_required(VERSION 2.8)
|
||
|
|
||
|
project(h804tun)
|
||
|
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra")
|
||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||
|
|
||
|
option(WITH_SYSTEMD "Enable systemd new-style daemon support" ON)
|
||
|
|
||
|
find_package(Threads)
|
||
|
|
||
|
add_executable(h804tun main.cpp common.cpp tundev.cpp)
|
||
|
target_link_libraries(h804tun ${CMAKE_THREAD_LIBS_INIT})
|
||
|
|
||
|
if (WITH_SYSTEMD)
|
||
|
add_definitions(-DH804_SYSTEMD_ENABLE)
|
||
|
target_link_libraries(h804tun -lsystemd)
|
||
|
endif (WITH_SYSTEMD)
|