Skip to content

Commit

Permalink
dtoverlay, vcgencmd, vcmailbox: fix build locations
Browse files Browse the repository at this point in the history
Use the install location variables provided by GNUInstallDirs.
  • Loading branch information
macmpi authored Oct 22, 2023
1 parent a8ff215 commit 00393b2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
10 changes: 5 additions & 5 deletions dtmerge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ install(FILES dtmerge.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

add_executable(dtoverlay dtoverlay_main.c utils.c)
target_link_libraries(dtoverlay dtovl)
install(TARGETS dtoverlay RUNTIME DESTINATION bin)
install(FILES dtoverlay.1 DESTINATION man/man1)
install(TARGETS dtoverlay RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES dtoverlay.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

add_custom_command(TARGET dtoverlay POST_BUILD COMMAND ln;-sf;dtoverlay;dtparam)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin)
install(FILES dtparam.1 DESTINATION man/man1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES dtparam.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post)
install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin)
install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION ${CMAKE_INSTALL_BINDIR})
9 changes: 7 additions & 2 deletions vcgencmd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.10)

include(GNUInstallDirs)

#set project name
project(vcgencmd)

add_executable(vcgencmd vcgencmd.c)
install(TARGETS vcgencmd RUNTIME DESTINATION bin)
install(FILES vcgencmd.1 DESTINATION man/man1)
install(TARGETS vcgencmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES vcgencmd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
11 changes: 8 additions & 3 deletions vcmailbox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
cmake_minimum_required(VERSION 3.10)

include(GNUInstallDirs)

#set project name
project(vcmailbox)

add_executable(vcmailbox vcmailbox.c)
target_link_libraries(vcmailbox)

install(TARGETS vcmailbox RUNTIME DESTINATION bin)
install(FILES vcmailbox.1 DESTINATION man/man1)
install(FILES vcmailbox.7 raspiotp.7 raspirev.7 DESTINATION man/man7)
install(TARGETS vcmailbox RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES vcmailbox.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
install(FILES vcmailbox.7 raspiotp.7 raspirev.7 DESTINATION ${CMAKE_INSTALL_MANDIR}/man7)

0 comments on commit 00393b2

Please sign in to comment.