diff options
author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2014-09-22 20:01:55 +0300 |
---|---|---|
committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2014-09-22 20:01:55 +0300 |
commit | 61e05f912557e3086cd80a10075aeaa6586519be (patch) | |
tree | 273d774f45d2522041c752015dc4247890dfc7e3 /indra/cmake | |
parent | 9c4a8951fffb2a649647178f396f01cf68f114fc (diff) |
MAINT-4170 Eliminate homoglyphs in URL hostnames: used 3p-uriparser;
Diffstat (limited to 'indra/cmake')
-rwxr-xr-x | indra/cmake/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/cmake/FindURIPARSER.cmake | 46 | ||||
-rw-r--r-- | indra/cmake/URIPARSER.cmake | 22 |
3 files changed, 70 insertions, 0 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 10a23ea068..9abdb4b146 100755 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -37,6 +37,7 @@ set(cmake_SOURCE_FILES FindNDOF.cmake FindOpenJPEG.cmake FindSCP.cmake + FindURIPARSER.cmake FindXmlRpcEpi.cmake FindZLIB.cmake FMODEX.cmake @@ -97,6 +98,7 @@ set(cmake_SOURCE_FILES Tut.cmake UI.cmake UnixInstall.cmake + URIPARSER.cmake Variables.cmake ViewerMiscLibs.cmake VisualLeakDetector.cmake diff --git a/indra/cmake/FindURIPARSER.cmake b/indra/cmake/FindURIPARSER.cmake new file mode 100644 index 0000000000..32457bcd60 --- /dev/null +++ b/indra/cmake/FindURIPARSER.cmake @@ -0,0 +1,46 @@ +# -*- cmake -*- + +# - Find uriparser +# Find the URIPARSER includes and library +# This module defines +# URIPARSER_INCLUDE_DIRS, where to find uriparser.h, etc. +# URIPARSER_LIBRARIES, the libraries needed to use uriparser. +# URIPARSER_FOUND, If false, do not try to use uriparser. +# +# This FindURIPARSER is about 43 times as fast the one provided with cmake (2.8.x), +# because it doesn't look up the version of uriparser, resulting in a dramatic +# speed up for configure (from 4 minutes 22 seconds to 6 seconds). +# +# Note: Since this file is only used for standalone, the windows +# specific parts were left out. + +FIND_PATH(URIPARSER_INCLUDE_DIR uriparser/uri.h + NO_SYSTEM_ENVIRONMENT_PATH + ) + +FIND_LIBRARY(URIPARSER_LIBRARY z) + +if (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR) + SET(URIPARSER_INCLUDE_DIRS ${URIPARSER_INCLUDE_DIR}) + SET(URIPARSER_LIBRARIES ${URIPARSER_LIBRARY}) + SET(URIPARSER_FOUND "YES") +else (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR) + SET(URIPARSER_FOUND "NO") +endif (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR) + +if (URIPARSER_FOUND) + if (NOT URIPARSER_FIND_QUIETLY) + message(STATUS "Found URIPARSER: ${URIPARSER_LIBRARIES}") + SET(URIPARSER_FIND_QUIETLY TRUE) + endif (NOT URIPARSER_FIND_QUIETLY) +else (URIPARSER_FOUND) + if (URIPARSER_FIND_REQUIRED) + message(FATAL_ERROR "Could not find URIPARSER library") + endif (URIPARSER_FIND_REQUIRED) +endif (URIPARSER_FOUND) + +mark_as_advanced( + URIPARSER_LIBRARY + URIPARSER_INCLUDE_DIR + ) + diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake new file mode 100644 index 0000000000..477e142ce5 --- /dev/null +++ b/indra/cmake/URIPARSER.cmake @@ -0,0 +1,22 @@ +# -*- cmake -*- + +set(URIPARSER_FIND_QUIETLY ON) +set(URIPARSER_FIND_REQUIRED ON) + +include(Prebuilt) + +if (STANDALONE) + include(FindURIPARSER) +else (STANDALONE) + use_prebuilt_binary(uriparser) + if (WINDOWS) + set(URIPARSER_LIBRARIES + debug uriparserd + optimized uriparser) + else (WINDOWS) + set(URIPARSER_LIBRARIES z) + endif (WINDOWS) + if (WINDOWS OR LINUX) + set(URIPARSER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/uriparser) + endif (WINDOWS OR LINUX) +endif (STANDALONE) |