Skip to content

Commit

Permalink
Use CMAKE_INSTALL_BINDIR
Browse files Browse the repository at this point in the history
Allow /bin install directory to be overriden. Debian for example uses this
to install FlightGear to /usr/games/ instead of /usr/bin/

https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
  • Loading branch information
jbicha committed Jul 9, 2016
1 parent 9650cf4 commit 25928bf
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Adding a new executable target

add_executable(myexecutable ${SOURCES} ${HEADERS})
target_link_libraries(myexecutable .... libraries ... )
install(TARGETS myexecutable RUNTIME DESTINATION bin)
install(TARGETS myexecutable RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

(If the executable should not be installed, omit the final line above)

Expand Down
2 changes: 1 addition & 1 deletion src/FDM/YASim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ target_link_libraries(yasim-proptest
${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})

install(TARGETS yasim yasim-proptest RUNTIME DESTINATION bin)
install(TARGETS yasim yasim-proptest RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

endif(ENABLE_TESTS)

4 changes: 2 additions & 2 deletions src/Input/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if(ENABLE_FGJS)
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)

install(TARGETS fgjs RUNTIME DESTINATION bin)
install(TARGETS fgjs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

if(ENABLE_JS_DEMO)
Expand All @@ -64,7 +64,7 @@ if(ENABLE_JS_DEMO)
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)

install(TARGETS js_demo RUNTIME DESTINATION bin)
install(TARGETS js_demo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

flightgear_component(Input "${SOURCES}" "${HEADERS}")
4 changes: 2 additions & 2 deletions src/Main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ endif()
if (APPLE)
install(TARGETS fgfs BUNDLE DESTINATION .)
else()
install(TARGETS fgfs RUNTIME DESTINATION bin)
install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

if(ENABLE_METAR)
Expand All @@ -174,5 +174,5 @@ if(ENABLE_METAR)
${PLATFORM_LIBS}
)

install(TARGETS metar RUNTIME DESTINATION bin)
install(TARGETS metar RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
2 changes: 1 addition & 1 deletion utils/GPSsmooth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ target_link_libraries(UGsmooth
${ZLIB_LIBRARY}
)

install(TARGETS GPSsmooth MIDGsmooth UGsmooth RUNTIME DESTINATION bin)
install(TARGETS GPSsmooth MIDGsmooth UGsmooth RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion utils/TerraSync/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
#)

#install(TARGETS terrasync RUNTIME DESTINATION bin)
#install(TARGETS terrasync RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion utils/fgai/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ target_link_libraries(fgai
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)

install(TARGETS fgai RUNTIME DESTINATION bin)
install(TARGETS fgai RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion utils/fgcom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ target_link_Libraries(${name}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)

install(TARGETS ${name} RUNTIME DESTINATION bin)
install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion utils/fgelev/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ target_link_libraries(fgelev
${ZLIB_LIBRARY}
)

install(TARGETS fgelev RUNTIME DESTINATION bin)
install(TARGETS fgelev RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion utils/fgpanel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if(GLUT_FOUND)

include_directories(${PNG_INCLUDE_DIR})

install(TARGETS fgpanel RUNTIME DESTINATION bin)
install(TARGETS fgpanel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
message(STATUS "glut NOT found, can't build fgpanel")
endif()
2 changes: 1 addition & 1 deletion utils/fgviewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ target_link_libraries(fgviewer
${FGVIEWER_RTI_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)
install(TARGETS fgviewer RUNTIME DESTINATION bin)
install(TARGETS fgviewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2 changes: 1 addition & 1 deletion utils/stgmerge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ target_link_libraries(stgmerge
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)

install(TARGETS stgmerge RUNTIME DESTINATION bin)
install(TARGETS stgmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 25928bf

Please sign in to comment.