From 307bd3b811bfe7b46375f51f8902c13ba8a2c6f3 Mon Sep 17 00:00:00 2001 From: Neal Probert Date: Fri, 12 Jul 2024 10:48:47 -0400 Subject: [PATCH] Fixed cmake install of binaries --- CMakeLists.txt | 5 +++++ daemons/cand/CMakeLists.txt | 2 ++ daemons/gpsd/CMakeLists.txt | 2 ++ daemons/logd/CMakeLists.txt | 2 ++ daemons/rtcmd/CMakeLists.txt | 2 ++ daemons/seriald/CMakeLists.txt | 2 ++ daemons/stdiod/CMakeLists.txt | 2 ++ 7 files changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0e6dc8..2e79d77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,9 +12,14 @@ foreach(SUB_DIR ${SUB_DIRS}) endforeach() # installs +file(GLOB BIN_PROGS "bin/*") file(GLOB BIN_SCRIPTS "bin-scripts/*") file(GLOB SBIN_SCRIPTS "sbin-scripts/*") +install(FILES ${BIN_PROGS} + DESTINATION bin + PERMISSIONS WORLD_EXECUTE WORLD_READ OWNER_WRITE +) install(FILES ${BIN_SCRIPTS} DESTINATION bin PERMISSIONS WORLD_EXECUTE WORLD_READ OWNER_WRITE diff --git a/daemons/cand/CMakeLists.txt b/daemons/cand/CMakeLists.txt index 206898e..715433a 100644 --- a/daemons/cand/CMakeLists.txt +++ b/daemons/cand/CMakeLists.txt @@ -19,6 +19,8 @@ set(SRCS CanTxGenerator.cpp ) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin) + # executables add_executable(${TARGET} ${TARGET}.cpp ${SRCS}) diff --git a/daemons/gpsd/CMakeLists.txt b/daemons/gpsd/CMakeLists.txt index c1e3fc8..f3d730f 100644 --- a/daemons/gpsd/CMakeLists.txt +++ b/daemons/gpsd/CMakeLists.txt @@ -21,6 +21,8 @@ set(SRCS ) # executables +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin) + add_executable(${TARGET} ${TARGET}.cpp ${SRCS}) install(TARGETS ${TARGET} DESTINATION sbin) diff --git a/daemons/logd/CMakeLists.txt b/daemons/logd/CMakeLists.txt index 05fcb6c..5176f0c 100644 --- a/daemons/logd/CMakeLists.txt +++ b/daemons/logd/CMakeLists.txt @@ -17,6 +17,8 @@ set(SRCS ) # executables +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin) + add_executable(${TARGET} ${TARGET}.cpp ${SRCS}) install(TARGETS ${TARGET} DESTINATION sbin) diff --git a/daemons/rtcmd/CMakeLists.txt b/daemons/rtcmd/CMakeLists.txt index 0d27246..014ac52 100644 --- a/daemons/rtcmd/CMakeLists.txt +++ b/daemons/rtcmd/CMakeLists.txt @@ -17,6 +17,8 @@ set(SRCS ) # executables +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin) + add_executable(${TARGET} ${TARGET}.cpp ${SRCS}) install(TARGETS ${TARGET} DESTINATION sbin) diff --git a/daemons/seriald/CMakeLists.txt b/daemons/seriald/CMakeLists.txt index 94243af..c2f3c10 100644 --- a/daemons/seriald/CMakeLists.txt +++ b/daemons/seriald/CMakeLists.txt @@ -17,6 +17,8 @@ set(SRCS ) # executables +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin) + add_executable(${TARGET} ${TARGET}.cpp ${SRCS}) install(TARGETS ${TARGET} DESTINATION sbin) diff --git a/daemons/stdiod/CMakeLists.txt b/daemons/stdiod/CMakeLists.txt index d0a398b..3cce37d 100644 --- a/daemons/stdiod/CMakeLists.txt +++ b/daemons/stdiod/CMakeLists.txt @@ -17,6 +17,8 @@ set(SRCS ) # executables +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../sbin) + add_executable(${TARGET} ${TARGET}.cpp ${SRCS}) install(TARGETS ${TARGET} DESTINATION sbin)