Quellcode durchsuchen

Made external project locations configurable.

Sascha Zelzer vor 13 Jahren
Ursprung
Commit
50e54b29d6

+ 12 - 2
CMakeExternals/CTKData.cmake

@@ -21,14 +21,24 @@ if(BUILD_TESTING)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTKData.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
   #    message(STATUS "Adding project:${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_TAG ${revision_tag}
+        ${location_args}
         UPDATE_COMMAND ""
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""

+ 31 - 21
CMakeExternals/DCMTK.cmake

@@ -27,28 +27,38 @@ if(${add_project})
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://git.dcmtk.org/dcmtk.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
-  #     message(STATUS "Adding project:${proj}")
-    ExternalProject_Add(${proj}
-      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
-      BINARY_DIR ${proj}-build
-      PREFIX ${proj}${ep_suffix}
-      GIT_REPOSITORY "${git_protocol}://git.dcmtk.org/dcmtk.git"
-      GIT_TAG ${revision_tag}
-      CMAKE_GENERATOR ${gen}
-      UPDATE_COMMAND ""
-      BUILD_COMMAND ""
-      CMAKE_CACHE_ARGS
-        ${ep_common_cache_args}
-        -DDCMTK_WITH_ZLIB:BOOL=OFF # see github issue #25
-        -DDCMTK_WITH_OPENSSL:BOOL=OFF # see github issue #25
-        -DDCMTK_WITH_PNG:BOOL=OFF # see github issue #25
-        -DDCMTK_WITH_TIFF:BOOL=OFF  # see github issue #25
-        -DDCMTK_WITH_XML:BOOL=OFF  # see github issue #25
-        -DDCMTK_FORCE_FPIC_ON_UNIX:BOOL=ON
-        -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS:BOOL=OFF
-      )
-    set(DCMTK_DIR ${ep_install_dir})
+      #message(STATUS "Adding project:${proj}")
+      ExternalProject_Add(${proj}
+        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+        BINARY_DIR ${proj}-build
+        PREFIX ${proj}${ep_suffix}
+        ${location_args}
+        CMAKE_GENERATOR ${gen}
+        UPDATE_COMMAND ""
+        BUILD_COMMAND ""
+        CMAKE_CACHE_ARGS
+          ${ep_common_cache_args}
+          -DDCMTK_WITH_ZLIB:BOOL=OFF # see github issue #25
+          -DDCMTK_WITH_OPENSSL:BOOL=OFF # see github issue #25
+          -DDCMTK_WITH_PNG:BOOL=OFF # see github issue #25
+          -DDCMTK_WITH_TIFF:BOOL=OFF  # see github issue #25
+          -DDCMTK_WITH_XML:BOOL=OFF  # see github issue #25
+          -DDCMTK_FORCE_FPIC_ON_UNIX:BOOL=ON
+          -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS:BOOL=OFF
+        )
+      set(DCMTK_DIR ${ep_install_dir})
 
   # This was used during heavy development on DCMTK itself.
   # Disabling it for now. (It also leads to to build errors

+ 12 - 2
CMakeExternals/ITK.cmake

@@ -27,14 +27,24 @@ if(${add_project})
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
   #     message(STATUS "Adding project:${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_TAG ${revision_tag}
+        ${location_args}
         UPDATE_COMMAND ""
         INSTALL_COMMAND ""
         CMAKE_GENERATOR ${gen}

+ 9 - 2
CMakeExternals/KWStyle.cmake

@@ -17,14 +17,21 @@ if(CTK_USE_KWSTYLE)
   if(CTK_SUPERBUILD)
 
     if(NOT DEFINED CTK_KWSTYLE_EXECUTABLE)
+    
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      else()
+        set(location_args CVS_REPOSITORY ":pserver:anoncvs:@public.kitware.com:/cvsroot/KWStyle"
+                          CVS_MODULE "KWStyle")
+      endif()
 
       ExternalProject_Add(${proj}
         SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
         BINARY_DIR ${proj}-build
         PREFIX ${proj}${ep_suffix}
         LIST_SEPARATOR ${sep}
-        CVS_REPOSITORY ":pserver:anoncvs:@public.kitware.com:/cvsroot/KWStyle"
-        CVS_MODULE "KWStyle"
+        ${location_args}
         CMAKE_GENERATOR ${gen}
         CMAKE_CACHE_ARGS
           ${ep_common_cache_args}

+ 12 - 2
CMakeExternals/Log4Qt.cmake

@@ -29,13 +29,23 @@ if(${add_project})
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
 
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/Log4Qt.git"
+                          GIT_TAG ${revision_tag})
+      endif()
+
   #     message(STATUS "Adding project:${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_TAG ${revision_tag}
+        ${location_args}
         CMAKE_GENERATOR ${gen}
         INSTALL_COMMAND ""
         UPDATE_COMMAND ""

+ 8 - 1
CMakeExternals/OpenIGTLink.cmake

@@ -24,13 +24,20 @@ if(${add_project})
   if(CTK_SUPERBUILD)
 
     if(NOT DEFINED OpenIGTLink_DIR)
+    
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      else()
+        set(location_args SVN_REPOSITORY "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink")
+      endif()
 
     #   message(STATUS "Adding project:${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"
+        ${location_args}
         INSTALL_COMMAND ""
         CMAKE_GENERATOR ${gen}
         CMAKE_CACHE_ARGS

+ 12 - 2
CMakeExternals/PythonQt.cmake

@@ -50,13 +50,23 @@ if(${add_project})
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
       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_TAG ${revision_tag}
+        ${location_args}
         CMAKE_GENERATOR ${gen}
         UPDATE_COMMAND ""
         BUILD_COMMAND ""

+ 12 - 2
CMakeExternals/PythonQtGenerator.cmake

@@ -56,14 +56,24 @@ if(CTK_WRAP_PYTHONQT_FULL)
         if(${proj}_REVISION_TAG)
           set(revision_tag ${${proj}_REVISION_TAG})
         endif()
+        
+        set(location_args )
+        if(${proj}_URL)
+          set(location_args URL ${${proj}_URL})
+        elseif(${proj}_GIT_REPOSITORY)
+          set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                            GIT_TAG ${revision_tag})
+        else()
+          set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
+                            GIT_TAG ${revision_tag})
+        endif()
 
         #message(STATUS "ExternalProject/PythonQtGenerator: PythonQt is NOT an ExternalProject")
         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_TAG 3171a94e16ba9bfee137
+          ${location_args}
           CMAKE_GENERATOR ${gen}
           UPDATE_COMMAND ""
           INSTALL_COMMAND ""

+ 12 - 2
CMakeExternals/QtSOAP.cmake

@@ -29,14 +29,24 @@ if(${add_project})
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
       #     message(STATUS "Adding project:${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_TAG ${revision_tag}
+        ${location_args}
         CMAKE_GENERATOR ${gen}
         UPDATE_COMMAND ""
         INSTALL_COMMAND ""

+ 12 - 2
CMakeExternals/VTK.cmake

@@ -41,14 +41,24 @@ if(${add_project} OR CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://vtk.org/VTK.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
   #     message(STATUS "Adding project:${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_TAG ${revision_tag}
+        ${location_args}
         UPDATE_COMMAND ""
         INSTALL_COMMAND ""
         CMAKE_GENERATOR ${gen}

+ 9 - 2
CMakeExternals/XIP.cmake

@@ -23,14 +23,21 @@ if(${add_project})
   if(CTK_SUPERBUILD)
 
     if(NOT DEFINED XIP_DIR)
+    
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      else()
+        set(location_args SVN_REPOSITORY "https://collab01a.scr.siemens.com/svn/xip/releases/latest"
+                          SVN_USERNAME "anonymous")
+      endif()
 
       #   message(STATUS "Adding project:${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_USERNAME "anonymous"
+        ${location_args}
         INSTALL_COMMAND ""
         CMAKE_GENERATOR ${gen}
         CMAKE_CACHE_ARGS

+ 12 - 2
CMakeExternals/ZMQ.cmake

@@ -29,14 +29,24 @@ if(${add_project})
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()
+      
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
+                          GIT_TAG ${revision_tag})
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://github.com/PatrickCheng/zeromq2.git"
+                          GIT_TAG ${revision_tag})
+      endif()
 
     #   message(STATUS "Adding project:${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_TAG ${revision_tag}
+        ${location_args}
         UPDATE_COMMAND ""
         INSTALL_COMMAND ""
         CMAKE_GENERATOR ${gen}

+ 14 - 2
CMakeExternals/qxmlrpc.cmake

@@ -24,14 +24,26 @@ if(${add_project})
   if(CTK_SUPERBUILD)
 
     if(NOT DEFINED qxmlrpc_DIR)
+    
+      set(location_args )
+      if(${proj}_URL)
+        set(location_args URL ${${proj}_URL})
+      elseif(${proj}_GIT_REPOSITORY)
+        set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY})
+        if(${proj}_REVISION_TAG)
+          list(APPEND location_args GIT_TAG ${${proj}_REVISION_TAG})
+        endif()
+      else()
+        set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/qxmlrpc.git"
+                          GIT_TAG "origin/patched")
+      endif()
       
       #message(STATUS "Adding project:${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/qxmlrpc.git"
-        GIT_TAG "origin/patched"
+        ${location_args}
         CMAKE_GENERATOR ${gen}
         INSTALL_COMMAND ""
         CMAKE_ARGS