mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 02:13:18 +08:00
chore: Removed /utf-8 option from ftxui compile options for Clang to improve compatibility.
This commit is contained in:
@@ -7,6 +7,19 @@ find_package(ftxui CONFIG REQUIRED)
|
|||||||
find_package(nlohmann_json REQUIRED)
|
find_package(nlohmann_json REQUIRED)
|
||||||
find_package(asio REQUIRED)
|
find_package(asio REQUIRED)
|
||||||
|
|
||||||
|
find_package(ftxui REQUIRED)
|
||||||
|
|
||||||
|
# 移除 /utf-8 选项
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")
|
||||||
|
foreach (component screen dom component)
|
||||||
|
get_target_property(FTXUI_COMPILE_OPTIONS ftxui::${component} INTERFACE_COMPILE_OPTIONS)
|
||||||
|
if (FTXUI_COMPILE_OPTIONS)
|
||||||
|
list(REMOVE_ITEM FTXUI_COMPILE_OPTIONS "/utf-8")
|
||||||
|
set_target_properties(ftxui::${component} PROPERTIES INTERFACE_COMPILE_OPTIONS "${FTXUI_COMPILE_OPTIONS}")
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_library(uno-game-lib
|
add_library(uno-game-lib
|
||||||
src/game/Card.cpp
|
src/game/Card.cpp
|
||||||
src/game/CardTile.cpp
|
src/game/CardTile.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user