mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:55:36 +02:00
25 lines
867 B
CMake
25 lines
867 B
CMake
#
|
|
# Copyright 2015 High Fidelity, Inc.
|
|
# Created by Bradley Austin Davis on 2015/10/10
|
|
#
|
|
# Distributed under the Apache License, Version 2.0.
|
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
#
|
|
macro(TARGET_OPENGL)
|
|
if (APPLE)
|
|
# link in required OS X frameworks and include the right GL headers
|
|
find_library(OpenGL OpenGL)
|
|
target_link_libraries(${TARGET_NAME} ${OpenGL})
|
|
elseif(ANDROID)
|
|
target_link_libraries(${TARGET_NAME} GLESv3 EGL)
|
|
else()
|
|
find_package(OpenGL REQUIRED)
|
|
if (${OPENGL_INCLUDE_DIR})
|
|
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
|
|
endif()
|
|
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}")
|
|
target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})
|
|
endif()
|
|
target_nsight()
|
|
target_glew()
|
|
endmacro()
|