generated from mod-cpp/pacman
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afd9f04
commit 604bd92
Showing
1 changed file
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 () |