mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Remove OVR
This commit is contained in:
@@ -29,7 +29,6 @@ option( BGFX_BUILD_EXAMPLES "Build bgfx examples." ON
|
||||
option( BGFX_INSTALL "Create installation target." ON )
|
||||
option( BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OFF )
|
||||
option( BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON )
|
||||
option( BGFX_USE_OVR "Build with OVR support." OFF )
|
||||
option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OFF )
|
||||
option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF )
|
||||
option( BGFX_CONFIG_DEBUG "Enables debug configuration on all builds" OFF )
|
||||
@@ -61,10 +60,6 @@ elseif( NOT IS_ABSOLUTE "${BGFX_DIR}")
|
||||
get_filename_component(BGFX_DIR "${BGFX_DIR}" REALPATH BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
if( BGFX_USE_OVR )
|
||||
include( cmake/ovr.cmake )
|
||||
endif()
|
||||
|
||||
include( cmake/shared.cmake )
|
||||
include( cmake/bx.cmake )
|
||||
include( cmake/bimg.cmake )
|
||||
|
||||
@@ -84,11 +84,6 @@ target_include_directories( bgfx
|
||||
# bgfx depends on bx and bimg
|
||||
target_link_libraries( bgfx PRIVATE bx bimg )
|
||||
|
||||
# ovr support
|
||||
if( BGFX_USE_OVR )
|
||||
target_link_libraries( bgfx PUBLIC ovr )
|
||||
endif()
|
||||
|
||||
# Frameworks required on iOS, tvOS and macOS
|
||||
if( ${CMAKE_SYSTEM_NAME} MATCHES iOS|tvOS )
|
||||
target_link_libraries (bgfx PUBLIC "-framework OpenGLES -framework Metal -framework UIKit -framework CoreGraphics -framework QuartzCore")
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# bgfx.cmake - bgfx building in cmake
|
||||
# Written in 2017 by Joshua Brookover <joshua.al.brookover@gmail.com>
|
||||
|
||||
# To the extent possible under law, the author(s) have dedicated all copyright
|
||||
# and related and neighboring rights to this software to the public domain
|
||||
# worldwide. This software is distributed without any warranty.
|
||||
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
# The ovr location is customizable via cache variable BGFX_OVR_DIR
|
||||
if( NOT BGFX_OVR_DIR )
|
||||
set( BGFX_OVR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/LibOVR" CACHE STRING "Location of LibOVR." )
|
||||
endif()
|
||||
|
||||
# Ensure the directory exists
|
||||
if( NOT IS_DIRECTORY ${BGFX_OVR_DIR} )
|
||||
message( SEND_ERROR "Could not load LibOVR, directory does not exist. ${BGFX_OVR_DIR}" )
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Create the ovr target
|
||||
add_library( ovr INTERFACE )
|
||||
|
||||
# Add include directory of ovr
|
||||
target_include_directories( ovr INTERFACE ${BGFX_OVR_DIR}/Include )
|
||||
|
||||
# Add bgfx configuration define
|
||||
target_compile_definitions( ovr INTERFACE "BGFX_CONFIG_USE_OVR=1" )
|
||||
|
||||
# Build system specific configurations
|
||||
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set( ARCH "x64" )
|
||||
else()
|
||||
set( ARCH "Win32" )
|
||||
endif()
|
||||
if( MSVC10 )
|
||||
target_link_libraries( ovr INTERFACE ${BGFX_OVR_DIR}/Lib/Windows/${ARCH}/Release/VS2010/LibOVR.lib )
|
||||
elseif( MSVC11 )
|
||||
target_link_libraries( ovr INTERFACE ${BGFX_OVR_DIR}/Lib/Windows/${ARCH}/Release/VS2012/LibOVR.lib )
|
||||
elseif( MSVC12 )
|
||||
target_link_libraries( ovr INTERFACE ${BGFX_OVR_DIR}/Lib/Windows/${ARCH}/Release/VS2013/LibOVR.lib )
|
||||
elseif( MSVC14 )
|
||||
target_link_libraries( ovr INTERFACE ${BGFX_OVR_DIR}/Lib/Windows/${ARCH}/Release/VS2015/LibOVR.lib )
|
||||
else()
|
||||
message( STATUS "OVR not supported on this platform." )
|
||||
endif()
|
||||
Reference in New Issue
Block a user