summaryrefslogtreecommitdiffstats
path: root/razerd/CMakeLists.txt
blob: 7a6ab83b81dbdc5f56f89ed32865ea064f9a19dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
include(${razer_SOURCE_DIR}/scripts/cmake.global)

add_executable(razerd
	       razerd.c)

set_target_properties(razerd PROPERTIES COMPILE_FLAGS ${GENERIC_COMPILE_FLAGS})

include_directories("${razer_SOURCE_DIR}/librazer")

target_link_libraries(razerd razer)
install(TARGETS razerd DESTINATION bin)

if (NOT DEFINED ENV{RPM_BUILD_ROOT} AND NOT DEFINED ENV{RAZERCFG_PKG_BUILD})
	if(SYSTEMD_UNIT_DIR)
		install_exec_cmd("systemctl --system daemon-reload"
				 "If you use systemd, please reload systemd manually or reboot the system")
		install_exec_cmd("systemctl --system --force enable razerd.service"
				 "If you use systemd, enable razerd.service manually")
	endif(SYSTEMD_UNIT_DIR)
	if(UDEV_DIR)
		install_exec_cmd("udevadm control --reload-rules"
				 "Please reload udev manually or reboot the system")
	endif(UDEV_DIR)
endif (NOT DEFINED ENV{RPM_BUILD_ROOT} AND NOT DEFINED ENV{RAZERCFG_PKG_BUILD})
bues.ch cgit interface