mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 15:43:24 +02:00
Compile fix for non-standard Qt5 install.
When Qt5 5.2.1 is compiled from source, configured with -developer-build, and used without being installed; then compiling interface results in the following compile error: libraries/shared/src/RegisteredMetaTypes.h:17:34: fatal error: QtScript/QScriptEngine: No such file or directory This commit fixes this by explicitely adding the include directory for QtScript/QScriptEngine to libraries/shared/CMakeLists.txt Likewise we get the compile error: In file included from /opt/highfidelity/hifi/hifi/animation-server/../libraries/voxels/src/VoxelEditPacketSender.h:18:0, from /opt/highfidelity/hifi/hifi/animation-server/src/AnimationServer.cpp:26: /opt/highfidelity/hifi/hifi/animation-server/../libraries/voxels/src/VoxelDetail.h:15:34: fatal error: QtScript/QScriptEngine: No such file or directory which is fixed by added the include directory for QtScript/QScriptEngine to animation-server/CMakeLists.txt Finally, compile errors like In file included from /opt/highfidelity/hifi/hifi/libraries/audio/src/AudioInjectorOptions.h:20:0, from /opt/highfidelity/hifi/hifi/libraries/audio/src/AudioInjector.h:21, from /opt/highfidelity/hifi/hifi/libraries/audio/src/AudioInjector.cpp:22: /opt/highfidelity/hifi/hifi/assignment-client/../libraries/shared/src/RegisteredMetaTypes.h:17:34: fatal error: QtScript/QScriptEngine: No such file or directory that requires to do the same in libraries/audio/CMakeLists.txt
This commit is contained in:
parent
9eba4b01f0
commit
f13bbdfae6
3 changed files with 14 additions and 4 deletions
|
@ -12,6 +12,9 @@ set(MACRO_DIR "${ROOT_DIR}/cmake/macros")
|
|||
# setup for find modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/")
|
||||
|
||||
find_package(Qt5 COMPONENTS Script)
|
||||
include_directories(SYSTEM "${Qt5Script_INCLUDE_DIRS}")
|
||||
|
||||
# set up the external glm library
|
||||
include("${MACRO_DIR}/IncludeGLM.cmake")
|
||||
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
@ -35,4 +38,4 @@ link_hifi_library(networking ${TARGET_NAME} "${ROOT_DIR}")
|
|||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
add_definitions(-Dssize_t=long)
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
|
@ -12,6 +12,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cm
|
|||
|
||||
set(TARGET_NAME audio)
|
||||
|
||||
find_package(Qt5 COMPONENTS Script)
|
||||
include_directories(SYSTEM "${Qt5Script_INCLUDE_DIRS}")
|
||||
|
||||
# set up the external glm library
|
||||
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
||||
setup_hifi_library(${TARGET_NAME})
|
||||
|
@ -26,4 +29,4 @@ link_hifi_library(networking ${TARGET_NAME} "${ROOT_DIR}")
|
|||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
add_definitions(-Dssize_t=long)
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
|
@ -10,7 +10,7 @@ set(MACRO_DIR "${ROOT_DIR}/cmake/macros")
|
|||
set(TARGET_NAME shared)
|
||||
project(${TARGET_NAME})
|
||||
|
||||
find_package(Qt5 COMPONENTS Network Widgets Xml)
|
||||
find_package(Qt5 COMPONENTS Network Widgets Xml Script)
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
||||
setup_hifi_library(${TARGET_NAME})
|
||||
|
@ -32,4 +32,8 @@ if (UNIX AND NOT APPLE)
|
|||
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
||||
endif (UNIX AND NOT APPLE)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets)
|
||||
# There is something special (bug) about Qt5Scripts, that we have to explicitly add its include
|
||||
# directory when Qt5 (5.2.1) is compiled from source and is not in a standard place.
|
||||
include_directories(SYSTEM "${Qt5Script_INCLUDE_DIRS}")
|
||||
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets)
|
||||
|
|
Loading…
Reference in a new issue