1
0
Fork 0
mirror of https://github.com/otakuto/crazydiskinfo.git synced 2025-08-07 22:53:17 +00:00

Install executable using GNUInstallDirs and CMAKE_INSTALL_SBINDIR

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: https://github.com/otakuto/crazydiskinfo/issues/29
This commit is contained in:
Paul Wise 2021-11-25 12:22:11 +08:00
parent 7575c58463
commit 320c159409
No known key found for this signature in database
GPG key ID: 3116BA5E9FFA69A3

View file

@ -6,4 +6,5 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
SET_TARGET_PROPERTIES(CrazyDiskInfo PROPERTIES OUTPUT_NAME crazy) SET_TARGET_PROPERTIES(CrazyDiskInfo PROPERTIES OUTPUT_NAME crazy)
target_link_libraries(CrazyDiskInfo atasmart) target_link_libraries(CrazyDiskInfo atasmart)
target_link_libraries(CrazyDiskInfo ncursesw) target_link_libraries(CrazyDiskInfo ncursesw)
INSTALL(TARGETS CrazyDiskInfo RUNTIME DESTINATION /usr/sbin) include(GNUInstallDirs)
INSTALL(TARGETS CrazyDiskInfo RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})