diff --git a/CMakeModules/QtConfiguration.cmake b/CMakeModules/QtConfiguration.cmake index c2da776..12b8f63 100644 --- a/CMakeModules/QtConfiguration.cmake +++ b/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) diff --git a/external/plistparser/CMakeLists.txt b/external/plistparser/CMakeLists.txt index f9e06e5..871679a 100644 --- a/external/plistparser/CMakeLists.txt +++ b/external/plistparser/CMakeLists.txt @@ -5,4 +5,5 @@ add_library(plistparser STATIC plistparser.h plistserializer.cpp plistserializer.h -) \ No newline at end of file +) +std_target_properties(plistparser) diff --git a/external/qslog/CMakeLists.txt b/external/qslog/CMakeLists.txt index 87b66b7..ae0f52d 100644 --- a/external/qslog/CMakeLists.txt +++ b/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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be62ddb..3b1bb0d 100644 --- a/src/CMakeLists.txt +++ b/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 $/../Resources COMMENT "Copy qt.conf to main bundle" ) -endif(APPLE) +endif() target_link_libraries(${MAIN_TARGET} shared