Skip to content

Commit

Permalink
CMake: On non-Apple unix, use find_package for OpenGL
Browse files Browse the repository at this point in the history
  • Loading branch information
lanodan authored and Gargaj committed Aug 2, 2022
1 parent 4f012da commit fe03c1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ else ()
set(BZC_PROJECT_LIBS ${BZC_PROJECT_LIBS} Threads::Threads)
endif ()

set(PLATFORM_LIBS GL fontconfig)
find_package(OpenGL COMPONENTS OpenGL REQUIRED)

set(PLATFORM_LIBS ${OPENGL_LIBRARIES} fontconfig)
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
list(APPEND PLATFORM_LIBS asound)
endif ()
Expand Down

0 comments on commit fe03c1d

Please sign in to comment.