mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
add find module for QCA and link to interface and DS
This commit is contained in:
parent
075ff22356
commit
89aeb034d1
3 changed files with 47 additions and 2 deletions
38
cmake/modules/FindQCA.cmake
Normal file
38
cmake/modules/FindQCA.cmake
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Try to find the QCA library
|
||||
#
|
||||
# You can provide a QCA_ROOT_DIR which contains lib and include directories
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# QCA_FOUND - system found qca
|
||||
# QCA_INCLUDE_DIRS - the qca include directory
|
||||
# QCA_LIBRARIES - Link this to use qca
|
||||
#
|
||||
# Created on 3/28/2014 by Stephen Birarda
|
||||
# Copyright (c) 2014 High Fidelity
|
||||
#
|
||||
|
||||
if (QCA_LIBRARIES AND QCA_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(QCA_FOUND TRUE)
|
||||
else ()
|
||||
|
||||
set(QCA_SEARCH_DIRS "${QCA_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/qca")
|
||||
|
||||
find_path(QCA_INCLUDE_DIR qca.h PATH_SUFFIXES include/QtCrypto HINTS ${QCA_SEARCH_DIRS})
|
||||
|
||||
find_library(QCA_LIBRARY NAMES qca PATH_SUFFIXES lib HINTS ${QCA_SEARCH_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QCA DEFAULT_MSG QCA_INCLUDE_DIR QCA_LIBRARY)
|
||||
|
||||
if (QCA_FOUND)
|
||||
if (NOT QCA_FIND_QUIETLY)
|
||||
message(STATUS "Found qca: ${QCA_LIBRARY}")
|
||||
endif ()
|
||||
else ()
|
||||
if (QCA_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find qca")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
|
@ -17,6 +17,7 @@ include(${MACRO_DIR}/IncludeGLM.cmake)
|
|||
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(QCA REQUIRED)
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
||||
|
||||
|
@ -36,8 +37,12 @@ include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
|||
link_hifi_library(shared ${TARGET_NAME} "${ROOT_DIR}")
|
||||
link_hifi_library(embedded-webserver ${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
# include the QCA dir
|
||||
include_directories(QCA_INCLUDE_DIR)
|
||||
|
||||
IF (WIN32)
|
||||
target_link_libraries(${TARGET_NAME} Winmm Ws2_32)
|
||||
ENDIF(WIN32)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Network)
|
||||
# link QtNetwork and QCA
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Network "${QCA_LIBRARY}")
|
|
@ -67,6 +67,7 @@ foreach(EXTERNAL_SOURCE_SUBDIR ${EXTERNAL_SOURCE_SUBDIRS})
|
|||
endforeach(EXTERNAL_SOURCE_SUBDIR)
|
||||
|
||||
find_package(Qt5 COMPONENTS Core Gui Multimedia Network OpenGL Script Svg WebKit WebKitWidgets Xml UiTools)
|
||||
find_package(QCA REQUIRED)
|
||||
|
||||
# grab the ui files in resources/ui
|
||||
file (GLOB_RECURSE QT_UI_FILES ui/*.ui)
|
||||
|
@ -187,7 +188,7 @@ 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}" "${QCA_INCLUDE_DIR}")
|
||||
|
||||
target_link_libraries(
|
||||
${TARGET_NAME}
|
||||
|
@ -195,6 +196,7 @@ target_link_libraries(
|
|||
"${ZLIB_LIBRARIES}"
|
||||
Qt5::Core Qt5::Gui Qt5::Multimedia Qt5::Network Qt5::OpenGL
|
||||
Qt5::Script Qt5::Svg Qt5::WebKit Qt5::WebKitWidgets Qt5::Xml Qt5::UiTools
|
||||
"${QCA_LIBRARY}"
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
|
|
Loading…
Reference in a new issue