Skip to content
Snippets Groups Projects
Commit 5ee55d22 authored by Tristan Walter's avatar Tristan Walter
Browse files

OPENGL2

parent 29a27c41
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,19 @@ else()
set(BUILD_SHARED_LIBS OFF)
endif()
if(TREX_BUILD_GLFW OR UNIX)
if(WIN32)
find_package(OpenGL REQUIRED)
message(STATUS "OpenGL library ${OPENGL_LIBRARY}")
elseif(UNIX AND NOT APPLE)
find_package(OpenGL REQUIRED)
SET(OPENGL_LIBRARY OpenGL::GL)
message(STATUS "OpenGL library ${OPENGL_LIBRARY}")
else()
find_library(OPENGL_LIBRARY OpenGL)
endif()
endif()
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-undefined,error -framework IOKit -framework CoreFoundation -framework CoreGraphics -framework CoreVideo -framework OpenCL -framework Cocoa -framework AppKit -framework AVKit -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Accelerate")
......@@ -950,19 +963,6 @@ foreach(dir ${dirs})
message(STATUS "dir='${dir}'")
endforeach()
if(TREX_BUILD_GLFW OR UNIX)
if(WIN32)
find_package(OpenGL REQUIRED)
message(STATUS "OpenGL library ${OPENGL_LIBRARY}")
elseif(UNIX AND NOT APPLE)
find_package(OpenGL REQUIRED)
SET(OPENGL_LIBRARY OpenGL::GL)
message(STATUS "OpenGL library ${OPENGL_LIBRARY}")
else()
find_library(OPENGL_LIBRARY OpenGL)
endif()
endif()
add_subdirectory(src)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment