Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next
This commit is contained in:
commit
49b13372f4
6 changed files with 34 additions and 10 deletions
|
@ -50,6 +50,19 @@ set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")
|
||||||
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
|
||||||
|
# override add_library to work around a missing feature in CMake 3.10
|
||||||
|
# see https://stackoverflow.com/questions/45401212/how-to-make-imported-target-global-afterwards
|
||||||
|
# for discussion of why we need this
|
||||||
|
function(add_library)
|
||||||
|
set(_args ${ARGN})
|
||||||
|
if ("${_args}" MATCHES ";IMPORTED")
|
||||||
|
list(APPEND _args GLOBAL)
|
||||||
|
endif()
|
||||||
|
_add_library(${_args})
|
||||||
|
endfunction()
|
||||||
|
endif()
|
||||||
|
|
||||||
project(FlightGear)
|
project(FlightGear)
|
||||||
|
|
||||||
# Define SRC_PARENT_DIR as the parent directory of the project source directory
|
# Define SRC_PARENT_DIR as the parent directory of the project source directory
|
||||||
|
|
|
@ -18,12 +18,15 @@ if(WIN32)
|
||||||
else()
|
else()
|
||||||
find_package(PkgConfig QUIET)
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
|
|
||||||
if(PKG_CONFIG_FOUND)
|
if(PKG_CONFIG_FOUND)
|
||||||
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
|
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
|
||||||
endif (PKG_CONFIG_FOUND)
|
endif (PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
if(DBUS_FOUND)
|
if(DBUS_FOUND)
|
||||||
set_target_properties(PkgConfig::DBUS PROPERTIES IMPORTED_GLOBAL TRUE)
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0")
|
||||||
|
set_target_properties(PkgConfig::DBUS PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(HAVE_DBUS 1)
|
set(HAVE_DBUS 1)
|
||||||
# alias the PkgConfig name to standard one
|
# alias the PkgConfig name to standard one
|
||||||
|
|
|
@ -22,7 +22,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(libEvent_FOUND)
|
if(libEvent_FOUND)
|
||||||
set_target_properties(PkgConfig::libEvent PROPERTIES IMPORTED_GLOBAL TRUE)
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0")
|
||||||
|
set_target_properties(PkgConfig::libEvent PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
# alias the PkgConfig name to standard one
|
# alias the PkgConfig name to standard one
|
||||||
add_library(libEvent ALIAS PkgConfig::libEvent)
|
add_library(libEvent ALIAS PkgConfig::libEvent)
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
install(TARGETS fgfs BUNDLE DESTINATION .)
|
|
||||||
else()
|
|
||||||
install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (TARGET sentry_crashpad::handler)
|
if (TARGET sentry_crashpad::handler)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -135,7 +135,11 @@ if (HAVE_QT)
|
||||||
${qml_sources})
|
${qml_sources})
|
||||||
|
|
||||||
set_property(TARGET fglauncher PROPERTY AUTOMOC ON)
|
set_property(TARGET fglauncher PROPERTY AUTOMOC ON)
|
||||||
target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI)
|
target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI )
|
||||||
|
|
||||||
|
# we include WindowBuilder.h which needs this
|
||||||
|
target_include_directories(fglauncher PRIVATE ${OPENSCENEGRAPH_INCLUDE_DIRS})
|
||||||
|
|
||||||
target_link_libraries(fglauncher Qt5::Core Qt5::Widgets Qt5::Network Qt5::Qml Qt5::Quick Qt5::Svg SimGearCore)
|
target_link_libraries(fglauncher Qt5::Core Qt5::Widgets Qt5::Network Qt5::Qml Qt5::Quick Qt5::Svg SimGearCore)
|
||||||
|
|
||||||
if (ENABLE_QQ_UI)
|
if (ENABLE_QQ_UI)
|
||||||
|
@ -196,8 +200,8 @@ if (HAVE_QT)
|
||||||
|
|
||||||
set_property(TARGET fgqmlui PROPERTY AUTOMOC ON)
|
set_property(TARGET fgqmlui PROPERTY AUTOMOC ON)
|
||||||
target_link_libraries(fgqmlui Qt5::Quick Qt5::Widgets Qt5::Network Qt5::Qml Qt5::Gui SimGearCore)
|
target_link_libraries(fgqmlui Qt5::Quick Qt5::Widgets Qt5::Network Qt5::Qml Qt5::Gui SimGearCore)
|
||||||
target_include_directories(fgqmlui PRIVATE ${PROJECT_BINARY_DIR}/src/GUI)
|
target_include_directories(fgqmlui PRIVATE ${PROJECT_BINARY_DIR}/src/GUI ${OPENSCENEGRAPH_INCLUDE_DIRS})
|
||||||
|
|
||||||
if (ENABLE_QQ_UI)
|
if (ENABLE_QQ_UI)
|
||||||
# this is a headers-only dependency, so we can include <private/qopenglcontext_p.h>
|
# this is a headers-only dependency, so we can include <private/qopenglcontext_p.h>
|
||||||
target_link_libraries(fgqmlui Qt5::GuiPrivate)
|
target_link_libraries(fgqmlui Qt5::GuiPrivate)
|
||||||
|
|
|
@ -99,6 +99,13 @@ export_debug_symbols(fgfs)
|
||||||
# Additional search paths for includes.
|
# Additional search paths for includes.
|
||||||
setup_fgfs_includes(fgfs)
|
setup_fgfs_includes(fgfs)
|
||||||
|
|
||||||
|
# this has to live here for compatability with older CMake versions
|
||||||
|
if (APPLE)
|
||||||
|
install(TARGETS fgfs BUNDLE DESTINATION .)
|
||||||
|
else()
|
||||||
|
install(TARGETS fgfs RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (TARGET sentry::sentry)
|
if (TARGET sentry::sentry)
|
||||||
target_link_libraries(fgfs sentry::sentry)
|
target_link_libraries(fgfs sentry::sentry)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue