Przeglądaj źródła

Only download Qt deps if not QTROOT is set

Tobias Hieta 9 lat temu
rodzic
commit
2effdbbf22
1 zmienionych plików z 7 dodań i 5 usunięć
  1. 7 5
      CMakeModules/QtConfiguration.cmake

+ 7 - 5
CMakeModules/QtConfiguration.cmake

@@ -1,10 +1,12 @@
 
 include(FetchDependencies)
-download_deps("plexmediaplayer-qt" dir)
-set(QTROOT ${dir})
-list(APPEND CMAKE_FIND_ROOT_PATH ${dir})
-list(APPEND CMAKE_PREFIX_PATH ${dir})
-include_directories(${dir}/include)
+if(NOT IS_DIRECTORY ${QTROOT})
+  download_deps("plexmediaplayer-qt" dir)
+  set(QTROOT ${dir})
+endif()
+list(APPEND CMAKE_FIND_ROOT_PATH ${QTROOT})
+list(APPEND CMAKE_PREFIX_PATH ${QTROOT})
+include_directories(${QTROOT}/include)
 
 # Write qt.conf in the Qt depends directory so that the Qt tools can find QML files
 set(QTCONFCONTENT "[Paths]