File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ if(NOT CMAKE_BUILD_TYPE)
2121 message (STATUS "Setting build type to '${CMAKE_BUILD_TYPE} ' as none was specified." )
2222endif ()
2323
24+ if (NOT CMAKE_INSTALL_BINDIR)
25+ set (CMAKE_INSTALL_BINDIR bin)
26+ endif ()
27+
2428set (CMAKE_C_FLAGS "-Wall -Wextra --pedantic -Wno-strict-aliasing -Wno-variadic-macros" )
2529set (CMAKE_C_FLAGS_DEBUG "-g -DDEBUG" )
2630set (CMAKE_C_FLAGS_RELEASE "-O2" )
@@ -98,7 +102,7 @@ endif()
98102
99103# INSTALL
100104
101- install (TARGETS ${TARGET_NAME} DESTINATION bin )
105+ install (TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} )
102106
103107set (SERVICE_EXTRA_OPTIONS "" )
104108if (IS_DIRECTORY "/etc/munin/plugins" AND
@@ -114,7 +118,7 @@ endif()
114118
115119configure_file (${TARGET_NAME} .service.in ${TARGET_NAME} .service)
116120
117- install (FILES ${TARGET_NAME} .service
121+ install (FILES ${CMAKE_BINARY_DIR} / ${ TARGET_NAME} .service
118122 DESTINATION ${CMAKE_INSTALL_PREFIX} /lib/systemd/system /)
119123
120124# TESTING
You can’t perform that action at this time.
0 commit comments