1
0
Fork 0

VR: Find the osgXR library

Allow the osgXR[1] library to be found and linked against. We'll use
this to implement VR in FlightGear.

[1] https://github.com/amalon/osgXR
This commit is contained in:
James Hogan 2021-07-17 23:19:14 +01:00
parent e25a560591
commit dcdda1044a
No known key found for this signature in database
GPG key ID: 35CEE4862B1023F2
4 changed files with 16 additions and 0 deletions

View file

@ -151,6 +151,11 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
if(HTS_ENGINE_FOUND) if(HTS_ENGINE_FOUND)
set(SYSTEM_HTS_ENGINE_DEFAULT 1) set(SYSTEM_HTS_ENGINE_DEFAULT 1)
endif() endif()
find_package(osgXR 0.3)
if (osgXR_FOUND)
set(ENABLE_OSGXR_DEFAULT 1)
endif()
endif() endif()
# FlightGear build options # FlightGear build options
@ -171,6 +176,7 @@ option(SYSTEM_GSM "Set to ON to build IAXClient with the system's GSM lib
option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT}) option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT})
option(SYSTEM_HTS_ENGINE "Set to ON to build Flightgear with the system's HTS Engine library" ${SYSTEM_HTS_ENGINE_DEFAULT}) option(SYSTEM_HTS_ENGINE "Set to ON to build Flightgear with the system's HTS Engine library" ${SYSTEM_HTS_ENGINE_DEFAULT})
option(SYSTEM_CPPUNIT "Set to ON to build Flightgear with the system's CppUnit library") option(SYSTEM_CPPUNIT "Set to ON to build Flightgear with the system's CppUnit library")
option(ENABLE_OSGXR "Set to ON to build Flightgear with OpenXR support via the osgXR library" ${ENABLE_OSGXR_DEFAULT})
# additional utilities # additional utilities
option(ENABLE_FGELEV "Set to ON to build the fgelev application (default)" ON) option(ENABLE_FGELEV "Set to ON to build the fgelev application (default)" ON)

View file

@ -4,6 +4,10 @@ function(setup_fgfs_includes target)
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/src/FDM/JSBSim) target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
endif() endif()
if(ENABLE_OSGXR)
target_include_directories(${target} PRIVATE ${osgXR_INCLUDE_DIR})
endif()
target_include_directories(${target} PRIVATE ${PLIB_INCLUDE_DIR}) target_include_directories(${target} PRIVATE ${PLIB_INCLUDE_DIR})
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/cjson) target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/cjson)
# only actually needed for httpd.cxx # only actually needed for httpd.cxx

View file

@ -23,6 +23,10 @@ function(setup_fgfs_libraries target)
target_link_libraries(${target} ${X11_LIBRARIES}) target_link_libraries(${target} ${X11_LIBRARIES})
endif() endif()
if(ENABLE_OSGXR)
target_link_libraries(${target} osgXR::osgXR)
endif()
target_link_libraries(${target} fgsqlite3 fgvoicesynth fgembeddedresources) target_link_libraries(${target} fgsqlite3 fgvoicesynth fgembeddedresources)
target_link_libraries(${target} target_link_libraries(${target}

View file

@ -75,3 +75,5 @@
#cmakedefine HAVE_SENTRY #cmakedefine HAVE_SENTRY
#define SENTRY_API_KEY "@sentry_api_key@" #define SENTRY_API_KEY "@sentry_api_key@"
#cmakedefine ENABLE_OSGXR