summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/FindICU4C.cmake33
-rw-r--r--indra/cmake/ICU4C.cmake37
-rw-r--r--indra/llcommon/CMakeLists.txt2
-rw-r--r--indra/newview/CMakeLists.txt2
5 files changed, 22 insertions, 53 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index f0b35c08f3..286ef3d411 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -30,6 +30,7 @@ set(cmake_SOURCE_FILES
GoogleMock.cmake
Havok.cmake
Hunspell.cmake
+ ICU4C.cmake
JsonCpp.cmake
LLAddBuildTest.cmake
LLAppearance.cmake
diff --git a/indra/cmake/FindICU4C.cmake b/indra/cmake/FindICU4C.cmake
deleted file mode 100644
index 327d761a88..0000000000
--- a/indra/cmake/FindICU4C.cmake
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- cmake -*-
-
-# - Find ICU4C
-# This module defines
-# ICU4C_INCLUDE_DIR, where to find headers
-# ICU4C_LIBRARY, the library needed to use ICU4C.
-# ICU4C_FOUND, If false, do not try to use ICU4C.
-
-find_path(ICU4C_INCLUDE_DIR uchar.h
- PATH_SUFFIXES unicode
- )
-
-set(ICU4C_NAMES ${ICU4C_NAMES} icuuc)
-find_library(ICU4C_LIBRARY
- NAMES ${ICU4C_NAMES}
- )
-
-if (ICU4C_LIBRARY AND ICU4C_INCLUDE_DIR)
- set(ICU4C_FOUND "YES")
-else (ICU4C_LIBRARY AND ICU4C_INCLUDE_DIR)
- set(ICU4C_FOUND "NO")
-endif (ICU4C_LIBRARY AND ICU4C_INCLUDE_DIR)
-
-if (ICU4C_FOUND)
- message(STATUS "Found ICU4C: Library in '${ICU4C_LIBRARY}' and header in '${ICU4C_INCLUDE_DIR}' ")
-else (ICU4C_FOUND)
- message(FATAL_ERROR " * * *\nCould not find ICU4C library! * * *")
-endif (ICU4C_FOUND)
-
-mark_as_advanced(
- ICU4C_LIBRARY
- ICU4C_INCLUDE_DIR
- )
diff --git a/indra/cmake/ICU4C.cmake b/indra/cmake/ICU4C.cmake
index b51087e0e7..7b27665483 100644
--- a/indra/cmake/ICU4C.cmake
+++ b/indra/cmake/ICU4C.cmake
@@ -1,22 +1,23 @@
# -*- cmake -*-
include(Prebuilt)
-set(ICU4C_FIND_QUIETLY ON)
-set(ICU4C_FIND_REQUIRED ON)
+include_guard()
-if (USESYSTEMLIBS)
- include(FindICU4C)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(icu4c)
- if (WINDOWS)
- set(ICU4C_LIBRARY icuuc)
- elseif(DARWIN)
- set(ICU4C_LIBRARY icuuc)
- #elseif(LINUX)
- # set(ICU4C_LIBRARY ...)
- else()
- message(FATAL_ERROR "Invalid platform")
- endif()
- set(ICU4C_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/unicode)
- use_prebuilt_binary(dictionaries)
-endif (USESYSTEMLIBS)
+add_library( ll::icu4c INTERFACE IMPORTED )
+
+
+use_system_binary(icu4c)
+use_prebuilt_binary(icu4c)
+if (WINDOWS)
+ target_link_libraries( ll::icu4c INTERFACE icuuc)
+elseif(DARWIN)
+ target_link_libraries( ll::icu4c INTERFACE icuuc)
+#elseif(LINUX)
+## target_link_libraries( ll::icu4c INTERFACE )
+else()
+ message(FATAL_ERROR "Invalid platform")
+endif()
+
+target_include_directories( ll::icu4c SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/unicode )
+
+use_prebuilt_binary(dictionaries)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 620b2c636c..0dcdf7f7cd 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -265,7 +265,6 @@ add_library (llcommon ${llcommon_SOURCE_FILES})
target_link_libraries(
llcommon
- ${ICU4C_LIBRARY}
ll::apr
ll::expat
ll::jsoncpp
@@ -274,6 +273,7 @@ target_link_libraries(
ll::uriparser
ll::oslibraries
ll::tracy
+ ll::icu4c
)
target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1f8b937965..840630d422 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1899,7 +1899,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLPHYSICSEXTENSIONS_LIBRARIES}
ll::bugsplat
ll::tracy
- ${ICU4C_LIBRARY}
+ ll::icu4u
)
if( TARGET ll::intel_memops )