mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 00:13:10 +02:00
add an NSS find module
This commit is contained in:
parent
fe7c949c53
commit
eeb3c11f76
2 changed files with 43 additions and 2 deletions
39
cmake/modules/FindNSS.cmake
Normal file
39
cmake/modules/FindNSS.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# FindNSS.cmake
|
||||
#
|
||||
# Try to find the Mozilla Network Security Services library
|
||||
#
|
||||
# You can provide an NSS_ROOT_DIR which contains lib and include directories
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# NSS_FOUND - system found NSS
|
||||
# NSS_INCLUDE_DIRS - the NSS include directory
|
||||
# NSS_LIBRARIES - Link this to use qxmpp
|
||||
#
|
||||
# Created on 3/10/2014 by Stephen Birarda
|
||||
# Copyright 2014 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
if (NSS_LIBRARIES AND NSS_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(NSS_FOUND TRUE)
|
||||
else ()
|
||||
|
||||
set(NSS_SEARCH_DIRS "${NSS_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/nss")
|
||||
|
||||
find_path(NSS_INCLUDE_DIRS nss/nss.h PATH_SUFFIXES include HINTS ${NSS_SEARCH_DIRS})
|
||||
|
||||
find_library(NSS_LIBRARY NAMES nss3 PATH_SUFFIXES lib HINTS ${NSS_SEARCH_DIRS})
|
||||
find_library(NSSUTIL_LIBRARY NAMES nssutil3 PATH_SUFFIXES lib HINTS ${NSS_SEARCH_DIRS})
|
||||
find_library(SMIME3_LIBRARY NAMES smime3 PATH_SUFFIXES lib HINTS ${NSS_SEARCH_DIRS})
|
||||
find_library(SSL3_LIBRARY NAMES ssl3 PATH_SUFFIXES lib HINTS ${NSS_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(NSS DEFAULT_MSG NSS_INCLUDE_DIRS NSS_LIBRARY NSSUTIL_LIBRARY SMIME3_LIBRARY SSL3_LIBRARY)
|
||||
|
||||
set(NSS_LIBRARIES "${NSS_LIBRARY} ${NSSUTIL_LIBRARY} ${SMIME3_LIBRARY} ${SSL3_LIBRARY}")
|
||||
endif ()
|
|
@ -131,7 +131,7 @@ link_hifi_library(audio ${TARGET_NAME} "${ROOT_DIR}")
|
|||
link_hifi_library(animation ${TARGET_NAME} "${ROOT_DIR}")
|
||||
link_hifi_library(script-engine ${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
# find any optional libraries
|
||||
# find any optional and required libraries
|
||||
find_package(Faceplus)
|
||||
find_package(Faceshift)
|
||||
find_package(LibOVR)
|
||||
|
@ -142,6 +142,7 @@ find_package(Visage)
|
|||
find_package(ZLIB)
|
||||
find_package(Qxmpp)
|
||||
find_package(RtMidi)
|
||||
find_package(NSS REQUIRED)
|
||||
|
||||
# include the Sixense library for Razer Hydra if available
|
||||
if (SIXENSE_FOUND AND NOT DISABLE_SIXENSE)
|
||||
|
@ -233,12 +234,13 @@ include_directories("${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}/includes"
|
|||
|
||||
# include external library headers
|
||||
# use system flag so warnings are supressed
|
||||
include_directories(SYSTEM "${FACESHIFT_INCLUDE_DIRS}")
|
||||
include_directories(SYSTEM "${FACESHIFT_INCLUDE_DIRS}" "${NSS_INCLUDE_DIRS}")
|
||||
|
||||
target_link_libraries(
|
||||
${TARGET_NAME}
|
||||
"${FACESHIFT_LIBRARIES}"
|
||||
"${ZLIB_LIBRARIES}"
|
||||
"${NSS_LIBRARIES}"
|
||||
Qt5::Core Qt5::Gui Qt5::Multimedia Qt5::Network Qt5::OpenGL
|
||||
Qt5::Script Qt5::Svg Qt5::WebKit Qt5::WebKitWidgets Qt5::Xml Qt5::UiTools
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue