-
Notifications
You must be signed in to change notification settings - Fork 69
/
CMakeLists.txt
39 lines (33 loc) · 1.15 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.13)
project(joycond)
set(CMAKE_CXX_STANDARD 17)
# Generate compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
find_package(PkgConfig)
pkg_check_modules(LIBEVDEV REQUIRED libevdev)
pkg_check_modules(LIBUDEV REQUIRED libudev)
add_executable(joycond "")
target_compile_options(joycond PRIVATE -Wall -Werror)
include_directories(
include/
${LIBEVDEV_INCLUDE_DIRS}
${LIBUDEV_INCLUDE_DIRS}
)
target_link_libraries(
joycond
${LIBEVDEV_LIBRARIES}
${LIBUDEV_LIBRARIES}
)
add_subdirectory(src)
install(TARGETS joycond DESTINATION /usr/bin/
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(FILES udev/89-joycond.rules udev/72-joycond.rules DESTINATION /lib/udev/rules.d/
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
install(FILES systemd/joycond.service DESTINATION /etc/systemd/system
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
install(FILES systemd/joycond.conf DESTINATION /etc/modules-load.d
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)