From: Juan Orti Alcaine Date: Wed, 5 Feb 2025 09:29:40 +0000 (+0100) Subject: Use GNUInstallDirs macros X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8aa8b706727a6a6a841be42ef35a629ed635db3e;p=project%2Fodhcp6c.git Use GNUInstallDirs macros Instead of installing to a hardcoded path, use the macros from GNUInstallDirs. This allows proper override of the directories at build time. This was discovered because the package failed to build in Fedora with the bin-sbin merge change: https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin https://bugzilla.redhat.com/show_bug.cgi?id=2340955 Signed-off-by: Juan Orti Alcaine --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 94f279c..3387fd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,8 @@ add_executable(odhcp6c ${SOURCES}) target_link_libraries(odhcp6c ${LIBRARIES}) # Installation -install(TARGETS odhcp6c DESTINATION sbin/) +include(GNUInstallDirs) +install(TARGETS odhcp6c DESTINATION "${CMAKE_INSTALL_SBINDIR}") # Packaging information set(CPACK_PACKAGE_VERSION "1")