1
0
Fork 0
mirror of https://github.com/otakuto/crazydiskinfo.git synced 2025-08-11 00:14:41 +00:00
crazydiskinfo/CMakeLists.txt
Paul Wise 320c159409
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
2021-11-25 13:49:56 +08:00

10 lines
495 B
CMake

cmake_minimum_required(VERSION 2.8.0)
option(RAW_VALUES_DEC "Display Raw Values in Decimal instead of Hex" OFF)
project(CrazyDiskInfo CXX)
add_executable(CrazyDiskInfo main.cpp)
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)
include(GNUInstallDirs)
INSTALL(TARGETS CrazyDiskInfo RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})