summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/FindHUNSPELL.cmake38
-rw-r--r--indra/cmake/Hunspell.cmake21
-rw-r--r--indra/newview/CMakeLists.txt1
4 files changed, 61 insertions, 0 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 279d577a27..9b836aac5f 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -37,6 +37,7 @@ set(cmake_SOURCE_FILES
GLOD.cmake
GStreamer010Plugin.cmake
GooglePerfTools.cmake
+ Hunspell.cmake
JPEG.cmake
LLAddBuildTest.cmake
LLAudio.cmake
diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake
new file mode 100644
index 0000000000..d411bdb9e5
--- /dev/null
+++ b/indra/cmake/FindHUNSPELL.cmake
@@ -0,0 +1,38 @@
+# -*- cmake -*-
+
+# - Find HUNSPELL
+# This module defines
+# HUNSPELL_INCLUDE_DIR, where to find libhunspell.h, etc.
+# HUNSPELL_LIBRARY, the library needed to use HUNSPELL.
+# HUNSPELL_FOUND, If false, do not try to use HUNSPELL.
+
+find_path(HUNSPELL_INCLUDE_DIR hunspell.h
+ PATH_SUFFIXES hunspell
+ )
+
+set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell)
+find_library(HUNSPELL_LIBRARY
+ NAMES ${HUNSPELL_NAMES}
+ )
+
+if (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
+ set(HUNSPELL_FOUND "YES")
+else (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
+ set(HUNSPELL_FOUND "NO")
+endif (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
+
+
+if (HUNSPELL_FOUND)
+ if (NOT HUNSPELL_FIND_QUIETLY)
+ message(STATUS "Found Hunspell: Library in '${HUNSPELL_LIBRARY}' and header in '${HUNSPELL_INCLUDE_DIR}' ")
+ endif (NOT HUNSPELL_FIND_QUIETLY)
+else (HUNSPELL_FOUND)
+ if (HUNSPELL_FIND_REQUIRED)
+ message(FATAL_ERROR " * * *\nCould not find HUNSPELL library! * * *")
+ endif (HUNSPELL_FIND_REQUIRED)
+endif (HUNSPELL_FOUND)
+
+mark_as_advanced(
+ HUNSPELL_LIBRARY
+ HUNSPELL_INCLUDE_DIR
+ )
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
new file mode 100644
index 0000000000..def2198c93
--- /dev/null
+++ b/indra/cmake/Hunspell.cmake
@@ -0,0 +1,21 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+set(HUNSPELL_FIND_QUIETLY ON)
+set(HUNSPELL_FIND_REQUIRED ON)
+
+if (STANDALONE)
+ include(FindHUNSPELL)
+else (STANDALONE)
+ use_prebuilt_binary(libhunspell)
+ if (WINDOWS)
+ set(HUNSPELL_LIBRARY libhunspell)
+ set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
+ elseif(DARWIN)
+ set(HUNSPELL_LIBRARY hunspell-1.3)
+ set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
+ else()
+ set(HUNSPELL_LIBRARY hunspell-1.3)
+ set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
+ endif()
+endif (STANDALONE)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0ec3e0e08a..fed9ea6790 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -13,6 +13,7 @@ include(EXPAT)
include(FMOD)
include(OPENAL)
include(FindOpenGL)
+include(Hunspell)
include(JsonCpp)
include(LLAudio)
include(LLCharacter)