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)
set(SYSTEM_HTS_ENGINE_DEFAULT 1)
endif()
find_package(osgXR 0.3)
if (osgXR_FOUND)
set(ENABLE_OSGXR_DEFAULT 1)
endif()
endif()
# 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_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(ENABLE_OSGXR "Set to ON to build Flightgear with OpenXR support via the osgXR library" ${ENABLE_OSGXR_DEFAULT})
# additional utilities
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)
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 ${PROJECT_SOURCE_DIR}/3rdparty/cjson)
# only actually needed for httpd.cxx

View file

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

View file

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