Skip to content

Commit

Permalink
Install executable using GNUInstallDirs and CMAKE_INSTALL_SBINDIR
Browse files Browse the repository at this point in the history
The executable should not be in /usr/sbin as that is for packages only.

Using GNUInstallDirs gives the right dir by default and
allows distros to install into /usr/sbin when they want.

Fixes: otakuto#29
  • Loading branch information
pabs3 committed Nov 25, 2021
1 parent 7575c58 commit 320c159
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
SET_TARGET_PROPERTIES(CrazyDiskInfo PROPERTIES OUTPUT_NAME crazy)
target_link_libraries(CrazyDiskInfo atasmart)
target_link_libraries(CrazyDiskInfo ncursesw)
INSTALL(TARGETS CrazyDiskInfo RUNTIME DESTINATION /usr/sbin)
include(GNUInstallDirs)
INSTALL(TARGETS CrazyDiskInfo RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})

0 comments on commit 320c159

Please sign in to comment.