mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Merge branch 'oglplus' into develop
This commit is contained in:
commit
95a4e1626e
3 changed files with 79 additions and 0 deletions
27
cmake/macros/IncludeOGLPLUS.cmake
Normal file
27
cmake/macros/IncludeOGLPLUS.cmake
Normal file
|
@ -0,0 +1,27 @@
|
|||
#
|
||||
# IncludeOGLPLUS.cmake
|
||||
#
|
||||
# Copyright 2013 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
macro(INCLUDE_OGLPLUS)
|
||||
find_package(OGLPLUS REQUIRED)
|
||||
find_package(BOOSTCONFIG REQUIRED)
|
||||
include_directories("${OGLPLUS_INCLUDE_DIRS}")
|
||||
include_directories("${BOOSTCONFIG_INCLUDE_DIRS}")
|
||||
|
||||
if (APPLE OR UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${OGLPLUS_INCLUDE_DIRS}")
|
||||
endif ()
|
||||
|
||||
# force oglplus to work in header only mode, use GLEW for GL definitions
|
||||
# and use boostconfig to determine compiler feature support.
|
||||
add_definitions(-DOGLPLUS_NO_SITE_CONFIG=1)
|
||||
add_definitions(-DOGLPLUS_USE_GLEW=1)
|
||||
add_definitions(-DOGLPLUS_USE_GLCOREARB=0)
|
||||
add_definitions(-DOGLPLUS_USE_BOOST_CONFIG=1)
|
||||
|
||||
endmacro(INCLUDE_OGLPLUS)
|
26
cmake/modules/FindBoostConfig.cmake
Normal file
26
cmake/modules/FindBoostConfig.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# FindBOOSTCONFIG.cmake
|
||||
#
|
||||
# Try to find BOOSTCONFIG include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# BOOSTCONFIG_INCLUDE_DIRS
|
||||
#
|
||||
# Created on 1/30/2015 by Brad Davis
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
# setup hints for BOOSTCONFIG search
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("boostconfig")
|
||||
|
||||
# locate header
|
||||
find_path(BOOSTCONFIG_INCLUDE_DIR "boost/config.hpp" PATH_SUFFIXES include HINTS ${BOOSTCONFIG_SEARCH_DIRS})
|
||||
set(BOOSTCONFIG_INCLUDE_DIRS "${BOOSTCONFIG_INCLUDE_DIR}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BOOSTCONFIG DEFAULT_MSG BOOSTCONFIG_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(BOOSTCONFIG_INCLUDE_DIRS BOOSTCONFIG_SEARCH_DIRS)
|
26
cmake/modules/FindOGLPLUS.cmake
Normal file
26
cmake/modules/FindOGLPLUS.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# FindOGLPLUS.cmake
|
||||
#
|
||||
# Try to find OGLPLUS include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# OGLPLUS_INCLUDE_DIRS
|
||||
#
|
||||
# Created on 1/30/2015 by Brad Davis
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
# setup hints for OGLPLUS search
|
||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
||||
hifi_library_search_hints("oglplus")
|
||||
|
||||
# locate header
|
||||
find_path(OGLPLUS_INCLUDE_DIR "oglplus/all.hpp" PATH_SUFFIXES include HINTS ${OGLPLUS_SEARCH_DIRS})
|
||||
set(OGLPLUS_INCLUDE_DIRS "${OGLPLUS_INCLUDE_DIR}/include")
|
||||
list(APPEND OGLPLUS_INCLUDE_DIRS "${OGLPLUS_INCLUDE_DIR}/implement")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OGLPLUS DEFAULT_MSG OGLPLUS_INCLUDE_DIRS)
|
||||
mark_as_advanced(OGLPLUS_INCLUDE_DIRS OGLPLUS_SEARCH_DIRS)
|
Loading…
Reference in a new issue