engine.cmake: OpenGL on unix needs to link with GLX.
This commit is contained in:
parent
a4f7c90f63
commit
7f141a8930
1 changed files with 7 additions and 2 deletions
|
|
@ -158,9 +158,14 @@ endif (WIN32)
|
||||||
# Select graphics API
|
# Select graphics API
|
||||||
|
|
||||||
# Only OpenGL Driver for now
|
# Only OpenGL Driver for now
|
||||||
find_package(OpenGL REQUIRED)
|
|
||||||
target_sources(Spectre PRIVATE ${ENGINE_GFXDRIVER_OPENGL_SRC})
|
target_sources(Spectre PRIVATE ${ENGINE_GFXDRIVER_OPENGL_SRC})
|
||||||
target_link_libraries(Spectre PRIVATE OpenGL::GL)
|
if (WIN32)
|
||||||
|
find_package(OpenGL REQUIRED COMPONENTS OpenGL)
|
||||||
|
target_link_libraries(Spectre PRIVATE OpenGL::GL)
|
||||||
|
else()
|
||||||
|
find_package(OpenGL REQUIRED COMPONENTS OpenGL GLX)
|
||||||
|
target_link_libraries(Spectre PRIVATE OpenGL::OpenGL OpenGL::GLX)
|
||||||
|
endif()
|
||||||
|
|
||||||
# FreeType
|
# FreeType
|
||||||
add_subdirectory(vendor/FreeType2)
|
add_subdirectory(vendor/FreeType2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue