changes to CMakeLists to up to qt5

This commit is contained in:
Stephen Birarda 2013-07-23 20:23:32 -07:00
parent fb05726323
commit e4169665a9
6 changed files with 17 additions and 8 deletions

View file

@ -3,11 +3,12 @@ MACRO(SETUP_HIFI_LIBRARY TARGET)
# grab the implemenation and header files
file(GLOB LIB_SRCS src/*.h src/*.cpp)
set(LIB_SRCS ${LIB_SRCS} ${WRAPPED_SRCS})
# create a library and set the property so it can be referenced later
add_library(${TARGET} ${LIB_SRCS})
find_package(Qt4 REQUIRED QtCore)
find_package(Qt5 REQUIRED QtCore)
include(${QT_USE_FILE})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${QT_QTGUI_INCLUDE_DIR}")

View file

@ -8,7 +8,7 @@ MACRO(SETUP_HIFI_PROJECT TARGET INCLUDE_QT)
add_executable(${TARGET} ${TARGET_SRCS})
IF (${INCLUDE_QT})
find_package(Qt4 REQUIRED QtCore)
find_package(Qt5 REQUIRED QtCore)
include(${QT_USE_FILE})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${QT_QTGUI_INCLUDE_DIR}")
ENDIF()

View file

@ -67,7 +67,7 @@ if (APPLE)
endif (APPLE)
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork QtOpenGL QtWebKit QtSvg)
find_package(Qt5 REQUIRED QtCore QtGui QtNetwork QtOpenGL QtWebKit QtSvg)
include(${QT_USE_FILE})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${QT_QTGUI_INCLUDE_DIR}")
@ -76,8 +76,8 @@ add_subdirectory(external/fervor/)
include_directories(external/fervor/)
# run qt moc on qt-enabled headers
qt4_wrap_cpp(INTERFACE_SRCS src/Application.h src/Webcam.h src/avatar/AvatarVoxelSystem.h
src/avatar/Face.h src/ui/BandwidthDialog.h src/ui/VoxelStatsDialog.h)
qt5_wrap_cpp(INTERFACE_SRCS src/Application.h src/Webcam.h src/avatar/AvatarVoxelSystem.h
src/avatar/Face.h src/ui/BandwidthDialog.h src/ui/VoxelStatsDialog.h)
# create the executable, make it a bundle on OS X
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS})

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8)
project(Fervor)
find_package(Qt4 REQUIRED)
find_package(Qt5 REQUIRED)
add_definitions(-DFV_GUI)
@ -13,8 +13,8 @@ list(REMOVE_ITEM FERVOR_HEADERS ${HEADER_PATH}/fvversioncomparator.h)
file(GLOB FERVOR_UI *.ui)
qt4_wrap_ui(FERVOR_WRAPPED_UI ${FERVOR_UI})
qt4_wrap_cpp(FERVOR_MOC_SOURCES ${FERVOR_HEADERS})
qt5_wrap_ui(FERVOR_WRAPPED_UI ${FERVOR_UI})
qt5_wrap_cpp(FERVOR_MOC_SOURCES ${FERVOR_HEADERS})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/")
find_package(Quazip REQUIRED)

View file

@ -8,6 +8,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cm
set(TARGET_NAME avatars)
find_package(Qt5 REQUIRED QtCore)
include(${QT_USE_FILE})
qt5_wrap_cpp(WRAPPED_SRCS src/AvatarData.h)
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
setup_hifi_library(${TARGET_NAME})

View file

@ -6,6 +6,10 @@ set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
set(TARGET_NAME shared)
project(${TARGET_NAME})
find_package(Qt5 REQUIRED QtCore)
include(${QT_USE_FILE})
qt5_wrap_cpp(WRAPPED_SRCS src/NodeData.h)
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
setup_hifi_library(${TARGET_NAME})