Fix build with Qt5.7

This commit is contained in:
Tobias Hieta 2016-04-28 16:00:43 +02:00
parent 32371ee8fe
commit 81e2c6ffe9
No known key found for this signature in database
GPG Key ID: A67BA2042997FBFA
4 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,10 @@
include(FetchDependencies)
if(WIN32)
set(WINARCHSTR ARCHSTR windows-x86_64)
endif(WIN32)
if(NOT IS_DIRECTORY ${QTROOT})
download_deps(
"plexmediaplayer-qt"
@ -17,14 +21,15 @@ if(NOT IS_DIRECTORY ${QTROOT})
")
file(WRITE ${QTROOT}/bin/qt.conf ${QTCONFCONTENT})
endif()
message(STATUS "Qt root directory: ${QTROOT}")
list(APPEND CMAKE_FIND_ROOT_PATH ${QTROOT})
list(APPEND CMAKE_PREFIX_PATH ${QTROOT})
include_directories(${QTROOT}/include)
set(REQUIRED_QT_VERSION "5.6.0")
message(STATUS ${QTROOT})
set(QTCONFIGROOT ${QTROOT}/lib/cmake/Qt5)
set(components Core Network WebChannel Qml Quick Xml WebEngine Widgets)

View File

@ -5,4 +5,5 @@ add_library(plistparser STATIC
plistparser.h
plistserializer.cpp
plistserializer.h
)
)
std_target_properties(plistparser)

View File

@ -1,3 +1,4 @@
set(CMAKE_AUTOMOC ON)
aux_source_directory(. QSLOG_SRC)
add_library(qslog STATIC ${QSLOG_SRC})
std_target_properties(qslog)

View File

@ -130,13 +130,13 @@ set_target_properties(${MAIN_TARGET} PROPERTIES
clang_tidy(${MAIN_TARGET})
# copy the qt.conf so that when running PMP from a debugger it finds the plugins and QML files
if(APPLE)
if(APPLE AND EXISTS ${QTROOT}/bin/qt.conf)
add_custom_command(
TARGET ${MAIN_TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${QTROOT}/bin/qt.conf $<TARGET_FILE_DIR:${MAIN_TARGET}>/../Resources
COMMENT "Copy qt.conf to main bundle"
)
endif(APPLE)
endif()
target_link_libraries(${MAIN_TARGET}
shared