Skip to content

Commit

Permalink
Move OpenGL related searches to glloadtests.cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCallow committed Aug 1, 2024
1 parent 86912c3 commit e322ca3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/loadtests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ set( CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE DISABLED )
set( fp_pref ${CMAKE_FIND_PACKAGE_PREFER_CONFIG} )
# Prefer CONFIG for vcpkg
set( CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE )
if(NOT APPLE_LOCKED_OS AND ${KTX_FEATURE_LOADTEST_APPS} MATCHES "OpenGL")
find_package(OpenGL REQUIRED)
endif()
# When using a local SDL2 package installed by brew, on macOS at
# least, a mysterious .../lib/$<CONFIG> appears in the library
# search paths in the generated project. I've been unable to find
Expand All @@ -45,9 +42,6 @@ if(NOT EMSCRIPTEN)
# loadtests when building for the web.
find_package(assimp REQUIRED)
endif()
if(WIN32 AND ${KTX_FEATURE_LOADTEST_APPS} MATCHES "OpenGL")
find_package(GLEW REQUIRED)
endif()
set( CMAKE_FIND_PACKAGE_PREFER_CONFIG ${fp_pref} )

# We use our own local copy of GL headers to ensure we have glcorearb.h.
Expand Down
7 changes: 7 additions & 0 deletions tests/loadtests/glloadtests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

set(OPENGL_ES_EMULATOR "" CACHE PATH "Path to OpenGL ES emulation libraries")

if(NOT APPLE_LOCKED_OS)
find_package(OpenGL REQUIRED)
endif()
if(WIN32)
find_package(GLEW REQUIRED)
endif()

function( create_gl_target target version sources common_resources test_images
KTX_GL_CONTEXT_PROFILE
KTX_GL_CONTEXT_MAJOR_VERSION KTX_GL_CONTEXT_MINOR_VERSION
Expand Down

0 comments on commit e322ca3

Please sign in to comment.