mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:14:35 +02:00
Integrated QXmpp in the build system.
This commit is contained in:
parent
07d3eb886a
commit
1c2e752f3c
4 changed files with 50 additions and 3 deletions
|
@ -34,6 +34,12 @@ if (APPLE)
|
||||||
endif (DARWIN_VERSION GREATER 12)
|
endif (DARWIN_VERSION GREATER 12)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
|
||||||
|
|
||||||
|
find_package(qxmpp REQUIRED)
|
||||||
|
add_definitions(-DQXMPP_STATIC)
|
||||||
|
include_directories(SYSTEM ${QXMPP_INCLUDE_DIR})
|
||||||
|
|
||||||
# targets not supported on windows
|
# targets not supported on windows
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
add_subdirectory(animation-server)
|
add_subdirectory(animation-server)
|
||||||
|
|
38
cmake/modules/FindQxmpp.cmake
Normal file
38
cmake/modules/FindQxmpp.cmake
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Try to find the qxmpp library
|
||||||
|
#
|
||||||
|
# You can provide a QXMPP_ROOT_DIR which contains lib and include directories
|
||||||
|
#
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# QXMPP_FOUND - system found qxmpp
|
||||||
|
# QXMPP_INCLUDE_DIRS - the qxmpp include directory
|
||||||
|
# QXMPP_LIBRARIES - Link this to use qxmpp
|
||||||
|
#
|
||||||
|
# Created on 3/10/2014 by Stephen Birarda
|
||||||
|
# Copyright (c) 2014 High Fidelity
|
||||||
|
#
|
||||||
|
|
||||||
|
if (QXMPP_LIBRARIES AND QXMPP_INCLUDE_DIRS)
|
||||||
|
# in cache already
|
||||||
|
set(QXMPP_FOUND TRUE)
|
||||||
|
else ()
|
||||||
|
|
||||||
|
set(QXMPP_SEARCH_DIRS "${QXMPP_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/qxmpp")
|
||||||
|
|
||||||
|
find_path(QXMPP_INCLUDE_DIR QXmppClient.h PATH_SUFFIXES include/qxmpp HINTS ${QXMPP_SEARCH_DIRS})
|
||||||
|
|
||||||
|
find_library(QXMPP_LIBRARY NAMES qxmpp qxmpp0 PATH_SUFFIXES lib HINTS ${QXMPP_SEARCH_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(QXMPP DEFAULT_MSG QXMPP_INCLUDE_DIR QXMPP_LIBRARY)
|
||||||
|
|
||||||
|
if (QXMPP_FOUND)
|
||||||
|
if (NOT QXMPP_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found qxmpp: ${QXMPP_LIBRARY}")
|
||||||
|
endif (NOT QXMPP_FIND_QUIETLY)
|
||||||
|
else ()
|
||||||
|
if (QXMPP_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find qxmpp")
|
||||||
|
endif (SIXENSE_FIND_REQUIRED)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
|
@ -65,6 +65,10 @@ endforeach(EXTERNAL_SOURCE_SUBDIR)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core Gui Multimedia Network OpenGL Script Svg WebKit WebKitWidgets Xml UiTools)
|
find_package(Qt5 COMPONENTS Core Gui Multimedia Network OpenGL Script Svg WebKit WebKitWidgets Xml UiTools)
|
||||||
|
|
||||||
|
find_package(Qxmpp REQUIRED)
|
||||||
|
add_definitions(-DQXMPP_STATIC)
|
||||||
|
include_directories(SYSTEM ${QXMPP_INCLUDE_DIR})
|
||||||
|
|
||||||
# grab the ui files in resources/ui
|
# grab the ui files in resources/ui
|
||||||
file (GLOB_RECURSE QT_UI_FILES ui/*.ui)
|
file (GLOB_RECURSE QT_UI_FILES ui/*.ui)
|
||||||
# have qt5 wrap them and generate the appropriate header files
|
# have qt5 wrap them and generate the appropriate header files
|
||||||
|
|
|
@ -10,7 +10,7 @@ set(MACRO_DIR "${ROOT_DIR}/cmake/macros")
|
||||||
set(TARGET_NAME shared)
|
set(TARGET_NAME shared)
|
||||||
project(${TARGET_NAME})
|
project(${TARGET_NAME})
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Network Widgets)
|
find_package(Qt5 COMPONENTS Network Widgets Xml)
|
||||||
|
|
||||||
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
||||||
setup_hifi_library(${TARGET_NAME})
|
setup_hifi_library(${TARGET_NAME})
|
||||||
|
@ -19,7 +19,6 @@ setup_hifi_library(${TARGET_NAME})
|
||||||
include(${MACRO_DIR}/IncludeGLM.cmake)
|
include(${MACRO_DIR}/IncludeGLM.cmake)
|
||||||
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
||||||
|
|
||||||
|
|
||||||
set(EXTERNAL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external")
|
set(EXTERNAL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external")
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -33,4 +32,4 @@ if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
endif (UNIX AND NOT APPLE)
|
endif (UNIX AND NOT APPLE)
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets)
|
target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets Qt5::Xml "${QXMPP_LIBRARY}")
|
||||||
|
|
Loading…
Reference in a new issue