瀏覽代碼

ENH: Pass Qt CMake variable using "mark_as_superbuild"

For sake of consistency, this commit update the system so that both
Qt4 and Qt5 variable are pass to the CTK inner build using the
same mechanism.
Jean-Christophe Fillion-Robin 11 年之前
父節點
當前提交
bd64c59bc4
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 4 2
      CMake/ctkMacroSetupQt.cmake
  2. 0 2
      SuperBuild.cmake

+ 4 - 2
CMake/ctkMacroSetupQt.cmake

@@ -75,10 +75,12 @@ macro(ctkMacroSetupQt)
       message(FATAL_ERROR "error: Qt4 was not found on your system. You probably need to set the QT_QMAKE_EXECUTABLE variable")
     endif()
 
-    mark_as_superbuild(QT_QMAKE_EXECUTABLE)
-
   else()
     message(FATAL_ERROR "error: Qt4 was not found on your system. You probably need to set the QT_QMAKE_EXECUTABLE variable")
   endif()
 
+  mark_as_superbuild(CTK_QT_VERSION)
+  mark_as_superbuild(QT_QMAKE_EXECUTABLE) # Qt 4
+  mark_as_superbuild(QT5_INSTALL_PREFIX)  # Qt 5
+
 endmacro()

+ 0 - 2
SuperBuild.cmake

@@ -45,8 +45,6 @@ ExternalProject_Add(${proj}
     -DCMAKE_CXX_FLAGS_INIT:STRING=${CMAKE_CXX_FLAGS_INIT}
     -DCMAKE_C_FLAGS_INIT:STRING=${CMAKE_C_FLAGS_INIT}
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-    -DCTK_QT_VERSION:STRING=${CTK_QT_VERSION}
-    -DQT5_INSTALL_PREFIX:PATH=${QT5_INSTALL_PREFIX}
   SOURCE_DIR ${CTK_SOURCE_DIR}
   BINARY_DIR ${CTK_BINARY_DIR}/CTK-build
   INSTALL_COMMAND ""