mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
- link `uno-game-lib` to `uno-game` instead of add sources to `uno-game` - styled `CMakedList.txt` and `test/CMakeList.txt`
25 lines
537 B
CMake
25 lines
537 B
CMake
cmake_minimum_required(VERSION 4.0)
|
|
project(uno-game)
|
|
|
|
set(CMAKE_CXX_STANDARD 26)
|
|
|
|
find_package(ftxui CONFIG REQUIRED)
|
|
|
|
add_library(uno-game-lib
|
|
src/game/Card.cpp
|
|
src/game/CardTile.cpp
|
|
src/game/Player.cpp
|
|
src/game/GameState.cpp
|
|
src/common/Utils.cpp
|
|
)
|
|
|
|
add_executable(uno-game src/main.cpp)
|
|
target_link_libraries(uno-game
|
|
PRIVATE uno-game-lib)
|
|
target_link_libraries(uno-game
|
|
PRIVATE ftxui::screen
|
|
PRIVATE ftxui::dom
|
|
PRIVATE ftxui::component
|
|
)
|
|
|
|
add_subdirectory(test) |