From 604bd926226027326081f7324b911d36191c3d12 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Wed, 20 Mar 2024 19:52:16 +0100 Subject: [PATCH] Readd after git add --renormalize . --- lib/CMakeLists.txt | 54 +++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 3929586..88d55bc 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,27 +1,27 @@ -find_package(SFML COMPONENTS system window graphics CONFIG 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" "*.hpp") - -if (ENABLE_RANGES) - message(STATUS "${CMAKE_PROJECT_NAME}: Use ranges (NPC_23.cpp)") - list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/NPC_20.cpp) -else () - message(STATUS "${CMAKE_PROJECT_NAME}: Don't use ranges (NPC_20.cpp)") - list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/NPC_23.cpp) -endif () - -add_library(lib_ms_pacman ${sources}) - -target_include_directories(lib_ms_pacman PUBLIC include) -target_link_libraries(lib_ms_pacman PUBLIC system-utils fmt::fmt sfml-system sfml-network sfml-graphics sfml-window) - - -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - target_link_libraries(lib_ms_pacman PUBLIC OpenGL::OpenGL OpenGL::GLX) -endif () +find_package(SFML COMPONENTS system window graphics CONFIG 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" "*.hpp") + +if (ENABLE_RANGES) + message(STATUS "${CMAKE_PROJECT_NAME}: Use ranges (NPC_23.cpp)") + list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/NPC_20.cpp) +else () + message(STATUS "${CMAKE_PROJECT_NAME}: Don't use ranges (NPC_20.cpp)") + list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/NPC_23.cpp) +endif () + +add_library(lib_ms_pacman ${sources}) + +target_include_directories(lib_ms_pacman PUBLIC include) +target_link_libraries(lib_ms_pacman PUBLIC system-utils fmt::fmt sfml-system sfml-network sfml-graphics sfml-window) + + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(lib_ms_pacman PUBLIC OpenGL::OpenGL OpenGL::GLX) +endif ()