util.cxx
positioninit.cxx
subsystemFactory.cxx
+ screensaver_control.cxx
${RESOURCE_FILE}
)
util.hxx
positioninit.hxx
subsystemFactory.hxx
+ AircraftDirVisitorBase.hxx
+ screensaver_control.hxx
)
get_property(FG_SOURCES GLOBAL PROPERTY FG_SOURCES)
# important we pass WIN32 here so the console is optional. Other
# platforms ignore this option. If a console is needed we allocate
# it manually via AllocConsole()
-add_executable(fgfs WIN32 ${SOURCES} ${FG_SOURCES} ${FG_HEADERS} ${HEADERS})
+# similarly pass MACOSX_BUNDLE so we generate a .app on Mac
+add_executable(fgfs WIN32 MACOSX_BUNDLE
+ ${SOURCES} ${FG_SOURCES} ${FG_HEADERS} ${HEADERS})
+
+#-----------------------------------------------------------------------------
+# MacOSX bundle packagaing
+
+if(APPLE)
+ execute_process(COMMAND date +%Y
+ OUTPUT_VARIABLE CURRENT_YEAR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ # in our local CMakeModules dir
+ set_target_properties(fgfs PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST FlightGearBundleInfo.plist.in
+ MACOSX_BUNDLE_GUI_IDENTIFIER "org.flightgear.FlightGear"
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${FLIGHTGEAR_VERSION}
+ MACOSX_BUNDLE_LONG_VERSION_STRING "FlightGear ${FLIGHTGEAR_VERSION} Nightly"
+ MACOSX_BUNDLE_BUNDLE_VERSION ${FLIGHTGEAR_VERSION}
+ MACOSX_BUNDLE_COPYRIGHT "FlightGear ${FLIGHTGEAR_VERSION} © 1997-${CURRENT_YEAR}, The FlightGear Project. Licensed under the GNU Public License version 2."
+ MACOSX_BUNDLE_INFO_STRING "Nightly build of FlightGear ${FLIGHTGEAR_VERSION} for testing and development"
+ MACOSX_BUNDLE_BUNDLE_NAME "FlightGear"
+ MACOSX_BUNDLE_ICON_FILE "FlightGear.icns"
+ )
+endif()
+
+#-----------------------------------------------------------------------------
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
#message(STATUS "fg libs ${FG_LIBS}")
if(ENABLE_IAX)
target_link_libraries(fgfs iaxclient_lib ${OPENAL_LIBRARY})
endif()
+if(USE_DBUS)
+ target_link_libraries(fgfs ${DBUS_LIBRARIES})
+endif()
if(FG_HAVE_GPERFTOOLS)
include_directories(${GooglePerfTools_INCLUDE_DIR})
target_link_libraries(fgfs ${GooglePerfTools_LIBRARIES})
endif()
+if (CRASHRPT_FOUND)
+ target_link_libraries(fgfs ${CRASHRPT_LIBRARY})
+endif()
+if(X11_FOUND)
+ target_link_libraries(fgfs ${X11_LIBRARIES})
+endif()
target_link_libraries(fgfs
${SQLITE3_LIBRARY}
${SIMGEAR_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES}
${OPENGL_LIBRARIES}
${PLIB_LIBRARIES}
- ${JPEG_LIBRARY}
+ ${ZLIB_LIBRARY}
${HLA_LIBRARIES}
${EVENT_INPUT_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
${PLATFORM_LIBS}
)
-install(TARGETS fgfs RUNTIME DESTINATION bin)
+if(ENABLE_FLITE)
+ if(SYSTEM_HTS_ENGINE)
+ target_link_libraries(fgfs flite_hts ${HTS_ENGINE_LIBRARIES})
+ else()
+ target_link_libraries(fgfs flite_hts hts_engine)
+ endif()
+endif()
+
+if (Qt5Core_FOUND)
+ target_link_libraries(fgfs Qt5::Widgets fglauncher)
+endif()
+
+if (APPLE)
+ install(TARGETS fgfs BUNDLE DESTINATION .)
+else()
+ install(TARGETS fgfs RUNTIME DESTINATION bin)
+endif()
if(ENABLE_METAR)
add_executable(metar metar_main.cxx)