2021-06-22 07:43:00 +00:00
|
|
|
find_package(SFML COMPONENTS COMPONENTS window graphics system CONFIG REQUIRED)
|
|
|
|
find_package(fmt REQUIRED)
|
|
|
|
|
2021-06-22 08:16:16 +00:00
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
find_package(OpenGL REQUIRED COMPONENTS OpenGL GLX)
|
|
|
|
endif ()
|
|
|
|
|
2021-06-22 07:43:00 +00:00
|
|
|
file(GLOB_RECURSE sources CONFIGURE_DEPENDS "*.cpp")
|
|
|
|
|
2021-06-22 07:45:19 +00:00
|
|
|
add_library(libpacman ${sources})
|
2021-06-22 07:43:00 +00:00
|
|
|
|
2021-07-05 10:02:26 +00:00
|
|
|
target_include_directories(libpacman PUBLIC include)
|
2021-07-08 08:17:05 +00:00
|
|
|
target_link_libraries(libpacman PUBLIC scaling-lib fmt::fmt sfml-graphics)
|
2021-06-22 08:16:16 +00:00
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
target_link_libraries(libpacman PUBLIC OpenGL::OpenGL OpenGL::GLX)
|
2021-07-08 08:17:05 +00:00
|
|
|
endif ()
|