mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 10:23:16 +08:00
style: style library linking in CMakeLists.txt
This commit is contained in:
@@ -24,12 +24,8 @@ add_library(uno-game-lib
|
|||||||
src/client/PlayerAction.cpp
|
src/client/PlayerAction.cpp
|
||||||
src/ui/GameUI.cpp
|
src/ui/GameUI.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(uno-game-lib
|
target_link_libraries(uno-game-lib PUBLIC nlohmann_json::nlohmann_json)
|
||||||
PUBLIC nlohmann_json::nlohmann_json
|
target_link_libraries(uno-game-lib PUBLIC asio::asio)
|
||||||
)
|
|
||||||
target_link_libraries(uno-game-lib
|
|
||||||
PUBLIC asio::asio
|
|
||||||
)
|
|
||||||
target_link_libraries(uno-game-lib PUBLIC Slint::Slint)
|
target_link_libraries(uno-game-lib PUBLIC Slint::Slint)
|
||||||
|
|
||||||
slint_target_sources(uno-game-lib ui/MainWindow.slint)
|
slint_target_sources(uno-game-lib ui/MainWindow.slint)
|
||||||
@@ -38,8 +34,7 @@ add_executable(uno-client
|
|||||||
src/client/main.cpp
|
src/client/main.cpp
|
||||||
assets/uno.rc
|
assets/uno.rc
|
||||||
)
|
)
|
||||||
target_link_libraries(uno-client
|
target_link_libraries(uno-client PRIVATE uno-game-lib)
|
||||||
PRIVATE uno-game-lib)
|
|
||||||
|
|
||||||
if (WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
set_target_properties(uno-client PROPERTIES WIN32_EXECUTABLE ON)
|
set_target_properties(uno-client PROPERTIES WIN32_EXECUTABLE ON)
|
||||||
@@ -49,10 +44,7 @@ add_executable(uno-server
|
|||||||
src/server/main.cpp
|
src/server/main.cpp
|
||||||
assets/uno.rc
|
assets/uno.rc
|
||||||
)
|
)
|
||||||
target_link_libraries(uno-server
|
target_link_libraries(uno-server PRIVATE uno-game-lib)
|
||||||
PRIVATE uno-game-lib)
|
target_link_libraries(uno-server PRIVATE argparse::argparse)
|
||||||
target_link_libraries(uno-server
|
|
||||||
PRIVATE argparse::argparse
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
Reference in New Issue
Block a user