forked from forno/Raspberry-Pi-Studio-Daemon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
25 lines (21 loc) · 888 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 3.1.3)
project(StudioDaemon
VERSION 0.1.0
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 14 CACHE STRING "CXX standard version")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "version required")
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "compiler extension")
find_package(Threads REQUIRED)
add_executable(studio_daemon src/main.cpp src/daemon.cpp)
target_link_libraries(studio_daemon Threads::Threads wiringPi)
target_compile_options(studio_daemon PRIVATE
$<$<CXX_COMPILER_ID:Clang>:-Weverything -Wno-c++98-compat>
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra>)
install(TARGETS studio_daemon
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(FILES script/launch_studio_daemon.sh
DESTINATION /etc/profile.d
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ WORLD_READ)