Skip to content

Commit

Permalink
Use CMake's FindOpenGL to handle OpenGL stuff.
Browse files Browse the repository at this point in the history
I mean, the only thing that uses OpenGL currently is a single include
in a stub file. Hardwiring the names of what appears to be Linux
libraries breaks macOS CI.
  • Loading branch information
Hoikas committed Feb 10, 2021
1 parent 959875b commit 65fe4a7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ if(PLASMA_PIPELINE STREQUAL "DirectX")
endif(PLASMA_PIPELINE STREQUAL "DirectX")

if(PLASMA_PIPELINE STREQUAL "OpenGL")
find_package(OpenGL REQUIRED)
list(APPEND plPipeline_ALL_FILES ${plGLPipeline_SOURCES} ${plGLPipeline_HEADERS})
# FIXME: should use a find module to find these libraries
set(OpenGL_LIBRARIES EGL GLESv2)
endif(PLASMA_PIPELINE STREQUAL "OpenGL")

add_library(plPipeline STATIC ${plPipeline_ALL_FILES})
Expand Down Expand Up @@ -132,7 +131,7 @@ target_link_libraries(plPipeline
pfCamera # plCaptureRender, plDynamicEnvMap, plDXPipeline
pfGameGUIMgr # plCaptureRender
$<$<STREQUAL:${PLASMA_PIPELINE},DirectX>:${DirectX_LIBRARIES}>
$<$<STREQUAL:${PLASMA_PIPELINE},OpenGL>:${OpenGL_LIBRARIES}>
$<$<STREQUAL:${PLASMA_PIPELINE},OpenGL>:OpenGL::GL>
INTERFACE
pnFactory
)
Expand Down

0 comments on commit 65fe4a7

Please sign in to comment.