Browse Source

Fix build with Qt5.7

Tobias Hieta 8 years ago
parent
commit
81e2c6ffe9

+ 7 - 2
CMakeModules/QtConfiguration.cmake

@@ -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)
 

+ 2 - 1
external/plistparser/CMakeLists.txt

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

+ 1 - 0
external/qslog/CMakeLists.txt

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

+ 2 - 2
src/CMakeLists.txt

@@ -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