1
0
Fork 0

Make compiling of all utils/tools optional

This commit is contained in:
Thomas Geymayer 2013-02-12 17:38:46 +01:00
parent b0a879a5b1
commit 6c10f99573
5 changed files with 85 additions and 44 deletions

View file

@ -144,7 +144,17 @@ option(SYSTEM_SQLITE "Set to ON to build FlightGear with the system's SQLite
# additional utilities
option(ENABLE_FGADMIN "Set to ON to build the FGADMIN application (default)" ON)
option(ENABLE_FGELEV "Set to ON to build the fgelev application (default)" ON)
option(WITH_FGPANEL "Set to ON to build the fgpanel application (default)" ON)
option(ENABLE_FGVIEWER "Set to ON to build the fgviewer application (default)" ON)
option(ENABLE_GPSSMOOTH "Set to ON to build the GPSsmooth application (default)" ON)
option(ENABLE_TERRASYNC "Set to ON to build the terrasync application (default)" ON)
option(ENABLE_FGJS "Set to ON to build the fgjs application (default)" ON)
option(ENABLE_JS_DEMO "Set to ON to build the js_demo application (default)" ON)
option(ENABLE_METAR "Set to ON to build the metar application (default)" ON)
option(ENABLE_TESTS "Set to ON to build test applications (default)" ON)
if(LOGGING)

View file

@ -12,11 +12,24 @@ endif(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
set(MANPAGES
fgfs.1
fgjs.1
fgpanel.1
gl-info.1
js_demo.1
terrasync.1)
)
if(WITH_FGPANEL)
list(APPEND MANPAGES fgpanel.1)
endif()
if(ENABLE_TERRASYNC)
list(APPEND MANPAGES terrasync.1)
endif()
if(ENABLE_FGJS)
list(APPEND MANPAGES fgjs.1)
endif()
if(ENABLE_JS_DEMO)
list(APPEND MANPAGES js_demo.1)
endif()
# map some variables to what the man-pages expect
set(PACKAGE ${CMAKE_PROJECT_NAME})

View file

@ -39,26 +39,32 @@ if(EVENT_INPUT)
include_directories(${UDEV_INCLUDE_DIR})
endif()
set(FGJS_SOURCES
fgjs.cxx
jsinput.cxx
jssuper.cxx
)
if(ENABLE_FGJS)
set(FGJS_SOURCES
fgjs.cxx
jsinput.cxx
jssuper.cxx
)
add_executable(fgjs ${FGJS_SOURCES})
add_executable(fgjs ${FGJS_SOURCES})
target_link_libraries(fgjs
${SIMGEAR_CORE_LIBRARIES}
${PLIB_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)
target_link_libraries(fgjs
${SIMGEAR_CORE_LIBRARIES}
${PLIB_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
install(TARGETS fgjs RUNTIME DESTINATION bin)
endif()
add_executable(js_demo js_demo.cxx)
if(ENABLE_JS_DEMO)
add_executable(js_demo js_demo.cxx)
target_link_libraries(js_demo
${SIMGEAR_CORE_LIBRARIES}
${PLIB_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)
target_link_libraries(js_demo
${SIMGEAR_CORE_LIBRARIES}
${PLIB_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
install(TARGETS js_demo RUNTIME DESTINATION bin)
endif()
flightgear_component(Input "${SOURCES}" "${HEADERS}")
install(TARGETS fgjs js_demo RUNTIME DESTINATION bin)
flightgear_component(Input "${SOURCES}" "${HEADERS}")

View file

@ -111,13 +111,14 @@ target_link_libraries(fgfs
install(TARGETS fgfs RUNTIME DESTINATION bin)
add_executable(metar metar_main.cxx)
if(ENABLE_METAR)
add_executable(metar metar_main.cxx)
target_link_libraries(metar
${SIMGEAR_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES}
${PLATFORM_LIBS}
)
target_link_libraries(metar
${SIMGEAR_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES}
${PLATFORM_LIBS}
)
install(TARGETS metar RUNTIME DESTINATION bin)
install(TARGETS metar RUNTIME DESTINATION bin)
endif()

View file

@ -1,21 +1,32 @@
add_subdirectory(TerraSync)
add_subdirectory(fgviewer)
add_subdirectory(fgelev)
add_subdirectory(GPSsmooth)
if (FLTK_FOUND)
if(FLTK_FOUND)
if (EXISTS ${FLTK_FLUID_EXECUTABLE})
add_subdirectory(fgadmin)
else ()
message(STATUS "fluid executable not found, disabling fgadmin")
endif ()
endif (FLTK_FOUND)
if (WITH_FGPANEL)
add_subdirectory(fgpanel)
endif (WITH_FGPANEL)
endif()
# win32 is just excluded because of not having argument parsing there ...
if(RTI_FOUND AND NOT WIN32)
add_subdirectory(fgai)
endif(RTI_FOUND AND NOT WIN32)
add_subdirectory(fgai)
endif()
if(ENABLE_FGELEV)
add_subdirectory(fgelev)
endif()
if(WITH_FGPANEL)
add_subdirectory(fgpanel)
endif()
if(ENABLE_FGVIEWER)
add_subdirectory(fgviewer)
endif()
if(ENABLE_GPSSMOOTH)
add_subdirectory(GPSsmooth)
endif()
if(ENABLE_TERRASYNC)
add_subdirectory(TerraSync)
endif()