Make it work on Linux again
This commit is contained in:
parent
6365cd2207
commit
493923036a
1 changed files with 8 additions and 0 deletions
|
@ -1,9 +1,17 @@
|
||||||
find_package(SFML COMPONENTS COMPONENTS window graphics system CONFIG REQUIRED)
|
find_package(SFML COMPONENTS COMPONENTS window graphics system CONFIG REQUIRED)
|
||||||
find_package(fmt REQUIRED)
|
find_package(fmt REQUIRED)
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
find_package(OpenGL REQUIRED COMPONENTS OpenGL GLX)
|
||||||
|
endif ()
|
||||||
|
|
||||||
file(GLOB_RECURSE sources CONFIGURE_DEPENDS "*.cpp")
|
file(GLOB_RECURSE sources CONFIGURE_DEPENDS "*.cpp")
|
||||||
|
|
||||||
add_library(libpacman ${sources})
|
add_library(libpacman ${sources})
|
||||||
|
|
||||||
target_include_directories(libpacman PUBLIC .)
|
target_include_directories(libpacman PUBLIC .)
|
||||||
target_link_libraries(libpacman PUBLIC fmt::fmt sfml-graphics)
|
target_link_libraries(libpacman PUBLIC fmt::fmt sfml-graphics)
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
target_link_libraries(libpacman PUBLIC OpenGL::OpenGL OpenGL::GLX)
|
||||||
|
endif ()
|
Loading…
Reference in a new issue