mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 08:23:50 -04:00
CMake still doesn't have a way to set mode and owner/group at install time atomically, so we have to fall back and call install directly in a script.
30 lines
732 B
CMake
30 lines
732 B
CMake
cmake_minimum_required(VERSION 3.16.3)
|
|
|
|
project(g13d CXX)
|
|
add_executable(pbm2lpbm pbm2lpbm.cc)
|
|
add_executable(g13d
|
|
g13.cc
|
|
g13_fonts.cc
|
|
g13_keys.cc
|
|
g13_lcd.cc
|
|
g13_log.cc
|
|
g13_main.cc
|
|
g13_stick.cc
|
|
helper.cc
|
|
)
|
|
|
|
target_compile_definitions(g13d PUBLIC BOOST_LOG_DYN_LINK=1)
|
|
find_package(PkgConfig)
|
|
pkg_check_modules(libusb-1.0 REQUIRED libusb-1.0)
|
|
find_package(Boost REQUIRED COMPONENTS system log program_options)
|
|
|
|
target_link_libraries(g13d
|
|
${Boost_SYSTEM_LIBRARY} ${Boost_LOG_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
|
|
${libusb-1.0_LIBRARIES})
|
|
|
|
install(TARGETS g13d pbm2lpbm RUNTIME)
|
|
install(CODE "
|
|
execute_process(COMMAND install -d -m 0660 -o root -g input /run/g13d)
|
|
message(STATUS \"Install: /run/g13d\")
|
|
")
|