Merge /u/ltoenning/flightgear_sim/ branch swift into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/161/
This commit is contained in:
commit
50cd7d3253
3 changed files with 36 additions and 71 deletions
|
@ -271,15 +271,19 @@ endif(EVENT_INPUT)
|
||||||
if (ENABLE_SWIFT)
|
if (ENABLE_SWIFT)
|
||||||
message(STATUS "SWIFT support requested, checking for DBus/libEvent")
|
message(STATUS "SWIFT support requested, checking for DBus/libEvent")
|
||||||
# DBUS
|
# DBUS
|
||||||
find_package(DBus REQUIRED)
|
find_package(DBus)
|
||||||
list(APPEND PLATFORM_LIBS ${DBUS_LIBRARIES})
|
|
||||||
|
|
||||||
#libevent
|
#libevent
|
||||||
find_package(LibEvent REQUIRED)
|
find_package(LibEvent)
|
||||||
list(APPEND PLATFORM_LIBS ${LIBEVENT_LIB})
|
|
||||||
|
|
||||||
if (NOT DBUS_LIBRARIES OR NOT LIBEVENT_LIB)
|
if (DBUS_LIBRARIES AND DBUS_INCLUDE_DIRS AND LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR)
|
||||||
message(FATAL_ERROR "SWIFT support requested, please ensure DBus/libEvent are available")
|
list(APPEND PLATFORM_LIBS ${DBUS_LIBRARIES})
|
||||||
|
list(APPEND PLATFORM_LIBS ${LIBEVENT_LIB})
|
||||||
|
include_directories(${DBUS_INCLUDE_DIRS}
|
||||||
|
${LIBEVENT_INCLUDE_DIR})
|
||||||
|
else()
|
||||||
|
message(WARNING "SWIFT support requested, but dbus and/or LibEvent not found. Swift support is disabled")
|
||||||
|
set(ENABLE_SWIFT 0)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -521,9 +525,7 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
|
||||||
${OPENGL_INCLUDE_DIR}
|
${OPENGL_INCLUDE_DIR}
|
||||||
${SIMGEAR_INCLUDE_DIRS}
|
${SIMGEAR_INCLUDE_DIRS}
|
||||||
${PLIB_INCLUDE_DIR}
|
${PLIB_INCLUDE_DIR}
|
||||||
${SQLITE3_INCLUDED_DIR}
|
${SQLITE3_INCLUDED_DIR} )
|
||||||
${DBUS_INCLUDE_DIRS}
|
|
||||||
${LIBEVENT_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
if (USE_AEONWAVE)
|
if (USE_AEONWAVE)
|
||||||
find_package(AAX REQUIRED)
|
find_package(AAX REQUIRED)
|
||||||
|
|
|
@ -1,59 +1,21 @@
|
||||||
# - Try to find DBus
|
# Finding dbus (https://www.freedesktop.org/wiki/Software/dbus/)
|
||||||
# Once done, this will define
|
# Defining:
|
||||||
#
|
# DBUS_LIBRARY
|
||||||
# DBUS_FOUND - system has DBus
|
# DBUS_INCLUDE_DIR
|
||||||
# DBUS_INCLUDE_DIRS - the DBus include directories
|
if(WIN32)
|
||||||
# DBUS_LIBRARIES - link these to use DBus
|
FIND_PATH(DBUS_INCLUDE_DIRS dbus/dbus.h PATH_SUFFIXES include HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||||
#
|
|
||||||
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer.
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
# notice, this list of conditions and the following disclaimer in the
|
|
||||||
# documentation and/or other materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
|
||||||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
|
||||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
||||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
||||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
||||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
FIND_PACKAGE(PkgConfig)
|
FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 PATH_SUFFIXES lib HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||||
PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1)
|
else()
|
||||||
|
include(FindPkgConfig)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(DBUS dbus-1)
|
||||||
|
endif (PKG_CONFIG_FOUND)
|
||||||
|
if(DBUS_FOUND)
|
||||||
|
set(HAVE_DBUS 1)
|
||||||
|
endif(DBUS_FOUND)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
FIND_LIBRARY(DBUS_LIBRARIES
|
include(FindPackageHandleStandardArgs)
|
||||||
NAMES dbus-1
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS DEFAULT_MSG
|
||||||
HINTS ${PC_DBUS_LIBDIR}
|
DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
|
||||||
${PC_DBUS_LIBRARY_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH(DBUS_INCLUDE_DIR
|
|
||||||
NAMES dbus/dbus.h
|
|
||||||
HINTS ${PC_DBUS_INCLUDEDIR}
|
|
||||||
${PC_DBUS_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} DIRECTORY)
|
|
||||||
FIND_PATH(DBUS_ARCH_INCLUDE_DIR
|
|
||||||
NAMES dbus/dbus-arch-deps.h
|
|
||||||
HINTS ${PC_DBUS_INCLUDEDIR}
|
|
||||||
${PC_DBUS_INCLUDE_DIRS}
|
|
||||||
${_DBUS_LIBRARY_DIR}
|
|
||||||
${DBUS_INCLUDE_DIR}
|
|
||||||
PATH_SUFFIXES include
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
|
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
|
|
|
@ -3,9 +3,10 @@
|
||||||
# LIBEVENT_LIB
|
# LIBEVENT_LIB
|
||||||
# LIBEVENT_INCLUDE_DIR
|
# LIBEVENT_INCLUDE_DIR
|
||||||
|
|
||||||
find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS})
|
FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h PATH_SUFFIXES include HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||||
find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})
|
|
||||||
|
|
||||||
if(LIBEVENT_INCLUDE_DIR AND LIBEVENT_LIB)
|
FIND_LIBRARY(LIBEVENT_LIB NAMES event_core PATH_SUFFIXES lib HINTS ${ADDITIONAL_LIBRARY_PATHS})
|
||||||
message(STATUS "LibEvent found.")
|
|
||||||
endif()
|
include(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBEVENT DEFAULT_MSG
|
||||||
|
LIBEVENT_INCLUDE_DIR LIBEVENT_LIB)
|
Loading…
Add table
Reference in a new issue