1
0
Fork 0

Use CMAKE_INSTALL_BINDIR

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
This commit is contained in:
Jeremy Bicha 2016-07-09 17:14:28 -04:00
parent 9650cf4e6a
commit 25928bf614
12 changed files with 14 additions and 14 deletions

View file

@ -148,7 +148,7 @@ Adding a new executable target
add_executable(myexecutable ${SOURCES} ${HEADERS}) add_executable(myexecutable ${SOURCES} ${HEADERS})
target_link_libraries(myexecutable .... libraries ... ) 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) (If the executable should not be installed, omit the final line above)

View file

@ -49,7 +49,7 @@ target_link_libraries(yasim-proptest
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}) ${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) endif(ENABLE_TESTS)

View file

@ -53,7 +53,7 @@ if(ENABLE_FGJS)
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )
install(TARGETS fgjs RUNTIME DESTINATION bin) install(TARGETS fgjs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
if(ENABLE_JS_DEMO) if(ENABLE_JS_DEMO)
@ -64,7 +64,7 @@ if(ENABLE_JS_DEMO)
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )
install(TARGETS js_demo RUNTIME DESTINATION bin) install(TARGETS js_demo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
flightgear_component(Input "${SOURCES}" "${HEADERS}") flightgear_component(Input "${SOURCES}" "${HEADERS}")

View file

@ -162,7 +162,7 @@ endif()
if (APPLE) if (APPLE)
install(TARGETS fgfs BUNDLE DESTINATION .) install(TARGETS fgfs BUNDLE DESTINATION .)
else() else()
install(TARGETS fgfs RUNTIME DESTINATION bin) install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
if(ENABLE_METAR) if(ENABLE_METAR)
@ -174,5 +174,5 @@ if(ENABLE_METAR)
${PLATFORM_LIBS} ${PLATFORM_LIBS}
) )
install(TARGETS metar RUNTIME DESTINATION bin) install(TARGETS metar RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()

View file

@ -38,4 +38,4 @@ target_link_libraries(UGsmooth
${ZLIB_LIBRARY} ${ZLIB_LIBRARY}
) )
install(TARGETS GPSsmooth MIDGsmooth UGsmooth RUNTIME DESTINATION bin) install(TARGETS GPSsmooth MIDGsmooth UGsmooth RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -6,4 +6,4 @@
# ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} # ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
#) #)
#install(TARGETS terrasync RUNTIME DESTINATION bin) #install(TARGETS terrasync RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -25,4 +25,4 @@ target_link_libraries(fgai
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )
install(TARGETS fgai RUNTIME DESTINATION bin) install(TARGETS fgai RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -31,4 +31,4 @@ target_link_Libraries(${name}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )
install(TARGETS ${name} RUNTIME DESTINATION bin) install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -8,4 +8,4 @@ target_link_libraries(fgelev
${ZLIB_LIBRARY} ${ZLIB_LIBRARY}
) )
install(TARGETS fgelev RUNTIME DESTINATION bin) install(TARGETS fgelev RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -35,7 +35,7 @@ if(GLUT_FOUND)
include_directories(${PNG_INCLUDE_DIR}) include_directories(${PNG_INCLUDE_DIR})
install(TARGETS fgpanel RUNTIME DESTINATION bin) install(TARGETS fgpanel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else() else()
message(STATUS "glut NOT found, can't build fgpanel") message(STATUS "glut NOT found, can't build fgpanel")
endif() endif()

View file

@ -53,4 +53,4 @@ target_link_libraries(fgviewer
${FGVIEWER_RTI_LIBRARIES} ${FGVIEWER_RTI_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )
install(TARGETS fgviewer RUNTIME DESTINATION bin) install(TARGETS fgviewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -7,4 +7,4 @@ target_link_libraries(stgmerge
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )
install(TARGETS stgmerge RUNTIME DESTINATION bin) install(TARGETS stgmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})