浏览代码

Update source and build directory associated with external project

Doing so will decrease the average length of external project path
associated with CTK.

If needed, make the "cleaning" of external project easier
"rm VTK*" instead of "cd" in each CMakeExternals sub folders ..
Jean-Christophe Fillion-Robin 15 年之前
父节点
当前提交
2c6c55f78d

+ 4 - 1
CMakeExternals/CTKData.cmake

@@ -17,6 +17,9 @@ IF(BUILD_TESTING)
   IF(NOT DEFINED CTKData_DIR)
   IF(NOT DEFINED CTKData_DIR)
   #   MESSAGE(STATUS "Adding project:${proj}")
   #   MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY ${git_protocol}://github.com/commontk/CTKData.git
       GIT_REPOSITORY ${git_protocol}://github.com/commontk/CTKData.git
       GIT_TAG "origin/master"
       GIT_TAG "origin/master"
       CONFIGURE_COMMAND ""
       CONFIGURE_COMMAND ""
@@ -25,7 +28,7 @@ IF(BUILD_TESTING)
       DEPENDS
       DEPENDS
         ${proj_DEPENDENCIES}
         ${proj_DEPENDENCIES}
       )
       )
-	  SET(CTKData_DIR ${ep_source_dir}/${proj})
+	  SET(CTKData_DIR ${CMAKE_BINARY_DIR}/${proj})
 	ELSE()
 	ELSE()
 	  ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
 	  ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
   ENDIF()
   ENDIF()

+ 12 - 9
CMakeExternals/DCMTK.cmake

@@ -22,21 +22,24 @@ IF(${add_project})
 #     MESSAGE(STATUS "Adding project:${proj}")
 #     MESSAGE(STATUS "Adding project:${proj}")
 
 
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
-        GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
-        GIT_TAG "origin/patched"
-        CMAKE_GENERATOR ${gen}
-        BUILD_COMMAND ""
-        CMAKE_ARGS
-          ${ep_common_args}
-          -DDCMTK_BUILD_APPS:BOOL=ON # Build also dmctk tools (movescu, storescp, ...)
-        )
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
+      GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
+      GIT_TAG "origin/patched"
+      CMAKE_GENERATOR ${gen}
+      BUILD_COMMAND ""
+      CMAKE_ARGS
+        ${ep_common_args}
+        -DDCMTK_BUILD_APPS:BOOL=ON # Build also dmctk tools (movescu, storescp, ...)
+      )
     SET(DCMTK_DIR ${ep_install_dir})
     SET(DCMTK_DIR ${ep_install_dir})
 
 
     ExternalProject_Add_Step(${proj} force_rebuild
     ExternalProject_Add_Step(${proj} force_rebuild
       COMMENT "Force ${proj} re-build"
       COMMENT "Force ${proj} re-build"
       DEPENDERS build    # Steps that depend on this step
       DEPENDERS build    # Steps that depend on this step
       ALWAYS 1
       ALWAYS 1
-      WORKING_DIRECTORY ${ep_build_dir}/${proj}
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${proj}-build
       DEPENDS
       DEPENDS
         ${proj_DEPENDENCIES}
         ${proj_DEPENDENCIES}
       )
       )

+ 4 - 1
CMakeExternals/ITK.cmake

@@ -19,6 +19,9 @@ IF(${add_project})
   IF(NOT DEFINED ITK_DIR)
   IF(NOT DEFINED ITK_DIR)
 #     MESSAGE(STATUS "Adding project:${proj}")
 #     MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"
       GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"
       GIT_TAG "origin/master"
       GIT_TAG "origin/master"
       INSTALL_COMMAND ""
       INSTALL_COMMAND ""
@@ -37,7 +40,7 @@ IF(${add_project})
       DEPENDS
       DEPENDS
         ${proj_DEPENDENCIES}
         ${proj_DEPENDENCIES}
       )
       )
-    SET(ITK_DIR ${ep_build_dir}/${proj})
+    SET(ITK_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
     
     
     # Since the link directories associated with ITK is used, it makes sens to 
     # Since the link directories associated with ITK is used, it makes sens to 
     # update CTK_EXTERNAL_LIBRARY_DIRS with its associated library output directory
     # update CTK_EXTERNAL_LIBRARY_DIRS with its associated library output directory

+ 3 - 0
CMakeExternals/KWStyle.cmake

@@ -16,6 +16,9 @@ IF(CTK_USE_KWSTYLE)
   
   
   IF(NOT DEFINED CTK_KWSTYLE_EXECUTABLE)
   IF(NOT DEFINED CTK_KWSTYLE_EXECUTABLE)
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       LIST_SEPARATOR ${sep}
       LIST_SEPARATOR ${sep}
       CVS_REPOSITORY ":pserver:anoncvs:@public.kitware.com:/cvsroot/KWStyle"
       CVS_REPOSITORY ":pserver:anoncvs:@public.kitware.com:/cvsroot/KWStyle"
       CVS_MODULE "KWStyle"
       CVS_MODULE "KWStyle"

+ 3 - 0
CMakeExternals/Log4Qt.cmake

@@ -20,6 +20,9 @@ IF(${add_project})
   IF(NOT DEFINED Log4Qt_DIR)
   IF(NOT DEFINED Log4Qt_DIR)
 #     MESSAGE(STATUS "Adding project:${proj}")
 #     MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/Log4Qt.git"
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/Log4Qt.git"
       GIT_TAG "origin/patched"
       GIT_TAG "origin/patched"
       CMAKE_GENERATOR ${gen}
       CMAKE_GENERATOR ${gen}

+ 4 - 1
CMakeExternals/OpenIGTLink.cmake

@@ -21,6 +21,9 @@ IF(${add_project})
     
     
   #   MESSAGE(STATUS "Adding project:${proj}")
   #   MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       SVN_REPOSITORY "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink"
       SVN_REPOSITORY "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink"
       INSTALL_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
       CMAKE_GENERATOR ${gen}
@@ -29,7 +32,7 @@ IF(${add_project})
       DEPENDS
       DEPENDS
         ${proj_DEPENDENCIES}
         ${proj_DEPENDENCIES}
       )
       )
-    SET(OpenIGTLink_DIR ${ep_build_dir}/${proj})
+    SET(OpenIGTLink_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
   
   
   ELSE()
   ELSE()
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")

+ 3 - 0
CMakeExternals/PythonQt.cmake

@@ -42,6 +42,9 @@ IF(${add_project})
     ENDIF()
     ENDIF()
       
       
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
       GIT_TAG "origin/patched"
       GIT_TAG "origin/patched"
       CMAKE_GENERATOR ${gen}
       CMAKE_GENERATOR ${gen}

+ 10 - 4
CMakeExternals/PythonQtGenerator.cmake

@@ -30,13 +30,16 @@ IF(CTK_WRAP_PYTHONQT_FULL)
     # on the same repository, we will assume that if the directory PythonQt 
     # on the same repository, we will assume that if the directory PythonQt 
     # exists, the generator code will also be available.
     # exists, the generator code will also be available.
     #
     #
-    IF(EXISTS ${ep_source_dir}/PythonQt)
+    IF(EXISTS ${CMAKE_BINARY_DIR}/PythonQt)
       #MESSAGE(STATUS "ExternalProject/PythonQtGenerator: PythonQt already added as ExternalProject")
       #MESSAGE(STATUS "ExternalProject/PythonQtGenerator: PythonQt already added as ExternalProject")
       ExternalProject_Add(${proj}
       ExternalProject_Add(${proj}
+        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+        BINARY_DIR ${proj}-build
+        PREFIX ${proj}${ep_suffix}
         DOWNLOAD_COMMAND ""
         DOWNLOAD_COMMAND ""
         CMAKE_GENERATOR ${gen}
         CMAKE_GENERATOR ${gen}
         INSTALL_COMMAND ""
         INSTALL_COMMAND ""
-        SOURCE_DIR ${ep_source_dir}/PythonQt/generator
+        SOURCE_DIR ${CMAKE_BINARY_DIR}/PythonQt/generator
         CMAKE_ARGS
         CMAKE_ARGS
           ${ep_common_args}
           ${ep_common_args}
           -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
           -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
@@ -46,18 +49,21 @@ IF(CTK_WRAP_PYTHONQT_FULL)
     ELSE()
     ELSE()
       #MESSAGE(STATUS "ExternalProject/PythonQtGenerator: PythonQt is NOT an ExternalProject")
       #MESSAGE(STATUS "ExternalProject/PythonQtGenerator: PythonQt is NOT an ExternalProject")
       ExternalProject_Add(${proj}
       ExternalProject_Add(${proj}
+        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+        BINARY_DIR ${proj}-build
+        PREFIX ${proj}${ep_suffix}
         GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
         GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
         GIT_TAG "patched"
         GIT_TAG "patched"
         CMAKE_GENERATOR ${gen}
         CMAKE_GENERATOR ${gen}
         INSTALL_COMMAND ""
         INSTALL_COMMAND ""
-        SOURCE_DIR ${ep_source_dir}/${proj}/generator
+        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}/generator
         CMAKE_ARGS
         CMAKE_ARGS
           ${ep_common_args}
           ${ep_common_args}
           -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
           -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         )
         )
     ENDIF()
     ENDIF()
     
     
-    SET(PYTHONQTGENERATOR_EXECUTABLE ${ep_build_dir}/PythonQtGenerator/PythonQtGenerator)
+    SET(PYTHONQTGENERATOR_EXECUTABLE ${CMAKE_BINARY_DIR}/PythonQtGenerator/PythonQtGenerator)
     
     
     # Since PythonQtGenerator is an executable, there is no need to add its corresponding 
     # Since PythonQtGenerator is an executable, there is no need to add its corresponding 
     # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
     # library output directory to CTK_EXTERNAL_LIBRARY_DIRS

+ 5 - 3
CMakeExternals/QtMobility.cmake

@@ -20,7 +20,7 @@ IF(${add_project})
     ENDIF()
     ENDIF()
     
     
     # Configure patch script
     # Configure patch script
-    SET(qtmobility_src_dir ${ep_source_dir}/${proj})
+    SET(qtmobility_src_dir ${CMAKE_BINARY_DIR}/${proj})
     SET(qtmobility_patch_dir ${CTK_SOURCE_DIR}/Utilities/QtMobility/)
     SET(qtmobility_patch_dir ${CTK_SOURCE_DIR}/Utilities/QtMobility/)
     SET(qtmobility_configured_patch_dir ${CTK_BINARY_DIR}/Utilities/QtMobility/)
     SET(qtmobility_configured_patch_dir ${CTK_BINARY_DIR}/Utilities/QtMobility/)
     SET(qtmobility_patchscript
     SET(qtmobility_patchscript
@@ -51,7 +51,7 @@ IF(${add_project})
       SET(qtmobility_install_cmd ${qtmobility_make_cmd} install)
       SET(qtmobility_install_cmd ${qtmobility_make_cmd} install)
       
       
       SET(QTMOBILITY_QTSERVICEFW_INCLUDE_DIR 
       SET(QTMOBILITY_QTSERVICEFW_INCLUDE_DIR 
-          "${CTK_BINARY_DIR}/CMakeExternals/Source/QtMobility/install/include")
+          "${CTK_BINARY_DIR}/QtMobility/install/include")
       SET(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG
       SET(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG
           "${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libQtServiceFrameworkd.so")
           "${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libQtServiceFrameworkd.so")
       SET(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE
       SET(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE
@@ -68,7 +68,7 @@ IF(${add_project})
         SET(qtmobility_servicefw_libname_release libQtServiceFramework.a)
         SET(qtmobility_servicefw_libname_release libQtServiceFramework.a)
       ENDIF()
       ENDIF()
 
 
-      SET(qtmobility_win32_install_prefix "${ep_source_dir}/${proj}/install/")
+      SET(qtmobility_win32_install_prefix "${CTK_BINARY_DIR}/${proj}/install/")
       STRING(REPLACE "/" "\\" qtmobility_win32_native_install_prefix ${qtmobility_win32_install_prefix})
       STRING(REPLACE "/" "\\" qtmobility_win32_native_install_prefix ${qtmobility_win32_install_prefix})
 
 
       SET(qtmobility_config_args -${qtmobility_build_type} -qt ${QT_BINARY_DIR} -prefix ${qtmobility_win32_native_install_prefix} -no-docs -modules ${qtmobility_modules})
       SET(qtmobility_config_args -${qtmobility_build_type} -qt ${QT_BINARY_DIR} -prefix ${qtmobility_win32_native_install_prefix} -no-docs -modules ${qtmobility_modules})
@@ -82,6 +82,8 @@ IF(${add_project})
     ENDIF()
     ENDIF()
     
     
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      PREFIX ${proj}${ep_suffix}
       URL ${CTK_SOURCE_DIR}/Utilities/QtMobility/qt-mobility-servicefw-opensource-src-1.0.0.tar.gz
       URL ${CTK_SOURCE_DIR}/Utilities/QtMobility/qt-mobility-servicefw-opensource-src-1.0.0.tar.gz
       PATCH_COMMAND ${CMAKE_COMMAND} -P ${qtmobility_patchscript}
       PATCH_COMMAND ${CMAKE_COMMAND} -P ${qtmobility_patchscript}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure ${qtmobility_config_args}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure ${qtmobility_config_args}

+ 4 - 1
CMakeExternals/QtSOAP.cmake

@@ -22,6 +22,9 @@ IF(${add_project})
   
   
     #     MESSAGE(STATUS "Adding project:${proj}")
     #     MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git"
       GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git"
       GIT_TAG "origin/master"
       GIT_TAG "origin/master"
       CMAKE_GENERATOR ${gen}
       CMAKE_GENERATOR ${gen}
@@ -32,7 +35,7 @@ IF(${add_project})
       DEPENDS
       DEPENDS
         ${proj_DEPENDENCIES}
         ${proj_DEPENDENCIES}
       )
       )
-    SET(QtSOAP_DIR "${ep_build_dir}/${proj}")
+    SET(QtSOAP_DIR "${CMAKE_BINARY_DIR}/${proj}-build")
     
     
     # Since QtSOAP is statically build, there is not need to add its corresponding 
     # Since QtSOAP is statically build, there is not need to add its corresponding 
     # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
     # library output directory to CTK_EXTERNAL_LIBRARY_DIRS

+ 4 - 1
CMakeExternals/VTK.cmake

@@ -32,6 +32,9 @@ IF(${add_project} OR CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
   IF(NOT DEFINED VTK_DIR)
   IF(NOT DEFINED VTK_DIR)
 #     MESSAGE(STATUS "Adding project:${proj}")
 #     MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY ${git_protocol}://vtk.org/VTK.git
       GIT_REPOSITORY ${git_protocol}://vtk.org/VTK.git
       GIT_TAG "origin/master"
       GIT_TAG "origin/master"
       INSTALL_COMMAND ""
       INSTALL_COMMAND ""
@@ -52,7 +55,7 @@ IF(${add_project} OR CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
       DEPENDS
       DEPENDS
         ${proj_DEPENDENCIES}
         ${proj_DEPENDENCIES}
       )
       )
-    SET(VTK_DIR ${ep_build_dir}/${proj})
+    SET(VTK_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
     
     
     # Since the link directories associated with VTK is used, it makes sens to 
     # Since the link directories associated with VTK is used, it makes sens to 
     # update CTK_EXTERNAL_LIBRARY_DIRS with its associated library output directory
     # update CTK_EXTERNAL_LIBRARY_DIRS with its associated library output directory

+ 4 - 1
CMakeExternals/XIP.cmake

@@ -19,6 +19,9 @@ IF(${add_project})
   IF(NOT DEFINED XIP_DIR)
   IF(NOT DEFINED XIP_DIR)
     #   MESSAGE(STATUS "Adding project:${proj}")
     #   MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       SVN_REPOSITORY "https://collab01a.scr.siemens.com/svn/xip/releases/latest"
       SVN_REPOSITORY "https://collab01a.scr.siemens.com/svn/xip/releases/latest"
       SVN_USERNAME "anonymous"
       SVN_USERNAME "anonymous"
       INSTALL_COMMAND ""
       INSTALL_COMMAND ""
@@ -28,7 +31,7 @@ IF(${add_project})
         -DHAS_VTK:BOOL=OFF
         -DHAS_VTK:BOOL=OFF
         -DHAS_ITK:BOOL=OFF
         -DHAS_ITK:BOOL=OFF
       )
       )
-    SET(XIP_DIR ${ep_build_dir}/${proj})
+    SET(XIP_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
     
     
   ELSE()
   ELSE()
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")

+ 4 - 1
CMakeExternals/ZMQ.cmake

@@ -20,6 +20,9 @@ IF(${add_project})
   IF(NOT DEFINED ZMQ_DIR)
   IF(NOT DEFINED ZMQ_DIR)
   #   MESSAGE(STATUS "Adding project:${proj}")
   #   MESSAGE(STATUS "Adding project:${proj}")
     ExternalProject_Add(${proj}
     ExternalProject_Add(${proj}
+      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+      BINARY_DIR ${proj}-build
+      PREFIX ${proj}${ep_suffix}
       GIT_REPOSITORY ${git_protocol}://github.com/PatrickCheng/zeromq2.git
       GIT_REPOSITORY ${git_protocol}://github.com/PatrickCheng/zeromq2.git
       GIT_TAG "origin/master"
       GIT_TAG "origin/master"
       INSTALL_COMMAND ""
       INSTALL_COMMAND ""
@@ -32,7 +35,7 @@ IF(${add_project})
 		  DEPENDS
 		  DEPENDS
 		    ${proj_DEPENDENCIES}
 		    ${proj_DEPENDENCIES}
       )
       )
-    SET(ZMQ_DIR ${ep_build_dir}/${proj})
+    SET(ZMQ_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
 	
 	
   ELSE()
   ELSE()
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
     ctkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")

+ 4 - 6
SuperBuild.cmake

@@ -73,12 +73,11 @@ endif()
 INCLUDE(ExternalProject)
 INCLUDE(ExternalProject)
 INCLUDE(ctkMacroEmptyExternalProject)
 INCLUDE(ctkMacroEmptyExternalProject)
 
 
-SET(ep_base "${CMAKE_BINARY_DIR}/CMakeExternals")
-SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${ep_base})
+#SET(ep_base "${CMAKE_BINARY_DIR}/CMakeExternals")
+#SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${ep_base})
 
 
-SET(ep_install_dir ${ep_base}/Install)
-SET(ep_build_dir ${ep_base}/Build)
-SET(ep_source_dir ${ep_base}/Source)
+SET(ep_install_dir ${CMAKE_BINARY_DIR}/CMakeExternals/Install)
+set(ep_suffix      "-cmake")
 #SET(ep_parallelism_level)
 #SET(ep_parallelism_level)
 SET(ep_build_shared_libs ON)
 SET(ep_build_shared_libs ON)
 SET(ep_build_testing OFF)
 SET(ep_build_testing OFF)
@@ -254,7 +253,6 @@ ExternalProject_Add(${proj}
     ${CTK_DEPENDS}
     ${CTK_DEPENDS}
   )
   )
 
 
-
 #-----------------------------------------------------------------------------
 #-----------------------------------------------------------------------------
 # CTK
 # CTK
 #
 #

+ 6 - 6
Utilities/QtMobility/QtMobility-1.0.0-patch.cmake.in

@@ -1,17 +1,17 @@
 # the patch step is run before the update step
 # the patch step is run before the update step
 # so we need to checkout the 1.0 branch here
 # so we need to checkout the 1.0 branch here
 
 
-set(work_dir @ep_source_dir@)
+set(work_dir "@CMAKE_BINARY_DIR@")
 set(proj_dir ${work_dir}/@proj@)
 set(proj_dir ${work_dir}/@proj@)
 
 
-INCLUDE(@CTK_SOURCE_DIR@/CMake/ctkFunctionLFtoCRLF.cmake)
-INCLUDE(@CTK_SOURCE_DIR@/CMake/ctkFunctionApplyPatches.cmake)
+INCLUDE("@CTK_SOURCE_DIR@/CMake/ctkFunctionLFtoCRLF.cmake")
+INCLUDE("@CTK_SOURCE_DIR@/CMake/ctkFunctionApplyPatches.cmake")
 
 
-SET(patch_dir @qtmobility_patch_dir@)
-SET(configured_patch_dir @qtmobility_configured_patch_dir@)
+SET(patch_dir "@qtmobility_patch_dir@")
+SET(configured_patch_dir "@qtmobility_configured_patch_dir@")
 
 
 # Variable required to properly configured the patch files
 # Variable required to properly configured the patch files
-SET(QT_BINARY_DIR @QT_BINARY_DIR@)
+SET(QT_BINARY_DIR "@QT_BINARY_DIR@")
 
 
 SET(patch_files
 SET(patch_files