1
0
Fork 0

Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next

This commit is contained in:
Erik Hofman 2020-08-24 08:17:13 +02:00
commit 49b13372f4
6 changed files with 34 additions and 10 deletions

View file

@ -50,6 +50,19 @@ set(CMAKE_CXX_STANDARD_REQUIRED YES)
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)
# Define SRC_PARENT_DIR as the parent directory of the project source directory

View file

@ -18,12 +18,15 @@ if(WIN32)
else()
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(DBUS IMPORTED_TARGET dbus-1)
endif (PKG_CONFIG_FOUND)
if(DBUS_FOUND)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0")
set_target_properties(PkgConfig::DBUS PROPERTIES IMPORTED_GLOBAL TRUE)
endif()
set(HAVE_DBUS 1)
# alias the PkgConfig name to standard one

View file

@ -22,7 +22,9 @@ else()
endif()
if(libEvent_FOUND)
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
add_library(libEvent ALIAS PkgConfig::libEvent)

View file

@ -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 (APPLE)

View file

@ -136,6 +136,10 @@ if (HAVE_QT)
set_property(TARGET fglauncher PROPERTY AUTOMOC ON)
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)
if (ENABLE_QQ_UI)
@ -196,7 +200,7 @@ if (HAVE_QT)
set_property(TARGET fgqmlui PROPERTY AUTOMOC ON)
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)
# this is a headers-only dependency, so we can include <private/qopenglcontext_p.h>

View file

@ -99,6 +99,13 @@ export_debug_symbols(fgfs)
# Additional search paths for includes.
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)
target_link_libraries(fgfs sentry::sentry)
endif()