Skip to content

Commit eaba54c

Browse files
committed
Link to ICU only on non windows platforms
1 parent 67d4b17 commit eaba54c

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ project(alicia-server)
55
option(BUILD_TESTS "Build tests" ON)
66

77
find_package(Boost 1.80.0 MODULE)
8-
find_package(ICU COMPONENTS uc REQUIRED)
8+
9+
if(NOT WIN32)
10+
find_package(ICU COMPONENTS uc REQUIRED)
11+
endif()
912

1013
add_subdirectory(3rd-party SYSTEM)
1114

@@ -65,18 +68,22 @@ add_library(alicia-libserver STATIC
6568
src/libserver/util/Stream.cpp
6669
src/libserver/util/Util.cpp)
6770
target_include_directories(alicia-libserver PUBLIC
68-
include/
69-
PRIVATE
71+
include/)
72+
if(NOT WIN32)
73+
target_include_directories(alicia-libserver PRIVATE
7074
${ICU_INCLUDE_DIRS}/)
75+
endif()
7176
target_link_libraries(alicia-libserver PUBLIC
7277
project-properties
7378
platform-properties
7479
spdlog::spdlog
7580
Boost::headers
7681
nlohmann_json::nlohmann_json
7782
yaml-cpp::yaml-cpp
78-
zlibstatic
79-
ICU::uc)
83+
zlibstatic)
84+
if(NOT WIN32)
85+
target_link_libraries(alicia-libserver PUBLIC ICU::uc)
86+
endif()
8087

8188
# alicia-server target
8289
add_executable(alicia-server

0 commit comments

Comments
 (0)