def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("wrapitk build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) # need unsigned short for itkPyImageFilter # with the switches below, I need /bigobj on win64 for the # following projects: ITKPyBasePython cmake_params = \ "-DBUILD_TESTING=OFF " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DINSTALL_WRAP_ITK_COMPATIBILITY=NO " \ "-DITK_DIR=%s " \ "-DITK_TEST_DRIVER=%s " \ "-DCableSwig_DIR=%s " \ "-DSWIG_DIR=%s " \ "-DSWIG_EXECUTABLE=%s " \ "-DVTK_DIR=%s " \ "-DWRAP_ITK_PYTHON=ON " \ "-DWRAP_complex_double=OFF " \ "-DWRAP_complex_float=ON " \ "-DWRAP_covariant_vector_double=OFF " \ "-DWRAP_covariant_vector_float=ON " \ "-DWRAP_double=OFF " \ "-DWRAP_float=ON " \ "-DWRAP_rgb_unsigned_char=OFF " \ "-DWRAP_rgb_unsigned_short=ON " \ "-DWRAP_rgba_unsigned_char=OFF " \ "-DWRAP_rgba_unsigned_short=OFF " \ "-DWRAP_signed_char=OFF " \ "-DWRAP_signed_long=OFF " \ "-DWRAP_signed_short=ON " \ "-DWRAP_unsigned_char=OFF " \ "-DWRAP_unsigned_long=OFF " \ "-DWRAP_unsigned_short=ON " \ "-DWRAP_vector_double=OFF " \ "-DWRAP_vector_float=ON " \ "-DPYTHON_EXECUTABLE=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DPYTHON_INCLUDE_PATH=%s " % \ (self.inst_dir, config.ITK_DIR, config.ITK_TEST_DRIVER, config.CABLESWIG_DIR, config.SWIG_DIR, config.SWIG_EXECUTABLE, config.VTK_DIR, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure WrapITK. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("ITK build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) # ITK_USE_REVIEW *must* be on for ItkVtkGlue to work! # following types are wrapped: # complex_float, float, signed_short, unsigned long, # vector_float # I've removed "-DITK_USE_REVIEW_STATISTICS=ON " # for now, as this seems to cause problems on win64 cmake_params = "-DBUILD_EXAMPLES=OFF " \ "-DBUILD_SHARED_LIBS=ON " \ "-DBUILD_TESTING=OFF " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DITK_USE_REVIEW=ON " \ "-DITK_USE_ORIENTED_IMAGE_DIRECTION=ON " \ "-DITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE=ON " \ "_DITK_USE_CENTERED_PIXEL_COORDINATES_CONSISTENTLY=ON " \ % (self.inst_dir,) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure ITK. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("VTK build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DBUILD_SHARED_LIBS=ON " \ "-DBUILD_TESTING=OFF " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DVTK_USE_TK=NO " \ "-DVTK_USE_METAIO=ON " \ "-DVTK_USE_PARALLEL=ON " \ "-DPYTHON_EXECUTABLE=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DPYTHON_INCLUDE_PATH=%s " \ "-DVTK_WRAP_PYTHON=ON " % (self.inst_dir, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure VTK. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("vtkdevide build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DBUILD_SHARED_LIBS=ON " \ "-DBUILD_TESTING=OFF " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DVTK_DIR=%s " \ "-DDCMTK_INCLUDE_PATH=%s " \ "-DDCMTK_LIB_PATH=%s " \ "-DPYTHON_EXECUTABLE=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DPYTHON_INCLUDE_PATH=%s" % \ (self.inst_dir, config.VTK_DIR, config.DCMTK_INCLUDE, config.DCMTK_LIB, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure vtkdevide. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("vtktud build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DBUILD_SHARED_LIBS=ON " \ "-DBUILD_CONTRIB=OFF " \ "-DBUILD_TESTING=OFF " \ "-DCMAKE_BACKWARDS_COMPATIBILITY=2.6 " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DVTK_DIR=%s" % (self.inst_dir, config.VTK_DIR) # we only add this under posix as a work-around to compile the # STLib code under g++ if os.name == 'posix': cmake_params = cmake_params + " -DCMAKE_CXX_FLAGS=-fpermissive " ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure vtktud. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("Exposure Render build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) QT_MOC_EXECUTABLE = os.path.join(config.QT_BIN, 'moc.exe') QT_QMAKE_EXECUTABLE = os.path.join(config.QT_BIN, 'qmake.exe') QT_UIC_EXECUTABLE = os.path.join(config.QT_BIN, 'uic.exe') #if not os.path.exists(QT_MOC_EXECUTABLE): # print "Qt MOC executable not found, aborting!" # return; cmake_params = \ "-DBUILD_SHARED_LIBS=ON " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DPYTHON_INCLUDE_DIR=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DQT_MOC_EXECUTABLE=%s " \ "-DQT_QMAKE_EXECUTABLE=%s " \ "-DQT_UIC_EXECUTABLE=%s " \ "-DVTK_DIR:PATH=%s" \ % (self.inst_dir, config.PYTHON_INCLUDE_PATH, config.PYTHON_LIBRARY, QT_MOC_EXECUTABLE, QT_QMAKE_EXECUTABLE, QT_UIC_EXECUTABLE, config.VTK_DIR) ret = utils.cmake_command(self.build_dir, os.path.join(self.source_dir, 'Source'), cmake_params) if ret != 0: utils.error( "Could not configure Exposure Render. Fix and try again.")
def configure(self): if WIN64: utils.output( 'Not building itkPyBuffer on win64 (no numpy).') return if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("itkPyBuffer build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) # we need the PATH types for VTK_DIR and for WrapITK_DIR, else # these variables are NOT stored. That's just weird. # we also need to pass the same instal prefix as for ITK, so # that the external module can be put in the right place. cmake_params = "-DBUILD_WRAPPERS=ON " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DITK_DIR=%s " \ "-DITK_TEST_DRIVER=%s " \ "-DWrapITK_DIR=%s " \ "-DSWIG_DIR=%s " \ "-DSWIG_EXECUTABLE=%s " \ "-DPYTHON_EXECUTABLE=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DPYTHON_INCLUDE_PATH=%s " \ % \ (config.WRAPITK_TOPLEVEL, config.ITK_DIR, config.ITK_TEST_DRIVER, config.WRAPITK_DIR, config.SWIG_DIR, config.SWIG_EXECUTABLE, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error( "Could not configure itkPyBuffer (P1). Fix and try again.")
def configure_nt(self): if os.path.exists(os.path.join(self.build_dir, "CMakeFiles/cmake.check_cache")): utils.output("DCMTK build already configured.") return # modify CMakeLists, changing occurrences of /MT # (multithreaded runtime options) into /MD (multithreaded DLL # runtime options) and /MTd into /MDd # we need to change this to match what we have in VTK os.chdir(self.build_dir) repls = [("\/MT", "/MD")] utils.re_sub_filter_file(repls, "CMakeLists.txt") # then run cmake cmake_params = "-DCMAKE_INSTALL_PREFIX=%s " % (self.inst_dir,) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure DCMTK. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("%s build already configured." % BASENAME) return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ % (self.inst_dir,) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error( "Could not configure %s. Fix and try again." % BASENAME)
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("CableSwig build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DBUILD_TESTING=OFF " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ % (self.inst_dir,) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure CableSwig. Fix and try again.")
def configure(self): if os.path.exists(os.path.join(self.build_dir, "CMakeFiles/cmake.check_cache")): utils.output("gdcm build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = ( "-DGDCM_BUILD_APPLICATIONS=OFF " "-DGDCM_BUILD_EXAMPLES=OFF " "-DGDCM_BUILD_SHARED_LIBS=ON " "-DGDCM_BUILD_TESTING=OFF " "-DGDCM_USE_ITK=OFF " "-DGDCM_USE_VTK=ON " "-DGDCM_USE_WXWIDGETS=OFF " "-DGDCM_WRAP_JAVA=OFF " "-DGDCM_WRAP_PHP=OFF " "-DGDCM_WRAP_PYTHON=ON " "-DCMAKE_BUILD_TYPE=RelWithDebInfo " "-DCMAKE_INSTALL_PREFIX=%s " "-DSWIG_DIR=%s " "-DSWIG_EXECUTABLE=%s " "-DVTK_DIR=%s " "-DPYTHON_EXECUTABLE=%s " "-DPYTHON_LIBRARY=%s " "-DPYTHON_INCLUDE_PATH=%s " % ( self.inst_dir, config.SWIG_DIR, config.SWIG_EXECUTABLE, config.VTK_DIR, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH, ) ) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure GDCM. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("Template Workbench build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) QT_MOC_EXECUTABLE = os.path.join(config.QT_BIN, 'moc.exe') QT_QMAKE_EXECUTABLE = os.path.join(config.QT_BIN, 'qmake.exe') QT_UIC_EXECUTABLE = os.path.join(config.QT_BIN, 'uic.exe') #if not os.path.exists(QT_MOC_EXECUTABLE): # print "Qt MOC executable not found, aborting!" # return; cmake_params = \ "-DBUILD_SHARED_LIBS=ON " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DPYTHON_INCLUDE_DIR=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DQT_MOC_EXECUTABLE=%s " \ "-DQT_QMAKE_EXECUTABLE=%s " \ "-DQT_UIC_EXECUTABLE=%s " \ "-DVTK_DIR:PATH=%s" \ % (self.inst_dir, config.PYTHON_INCLUDE_PATH, config.PYTHON_LIBRARY, QT_MOC_EXECUTABLE, QT_QMAKE_EXECUTABLE, QT_UIC_EXECUTABLE, config.VTK_DIR) ret = utils.cmake_command(self.build_dir, os.path.join(self.source_dir, 'Source'), cmake_params) if ret != 0: utils.error("Could not configure Exposure Render. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("VTK build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) QT_MOC_EXECUTABLE = os.path.join(config.QT_BIN, 'moc.exe') QT_QMAKE_EXECUTABLE = os.path.join(config.QT_BIN, 'qmake.exe') QT_UIC_EXECUTABLE = os.path.join(config.QT_BIN, 'uic.exe') cmake_params = "-DBUILD_SHARED_LIBS=ON " \ "-DBUILD_TESTING=OFF " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DVTK_USE_TK=NO " \ "-DVTK_USE_METAIO=ON " \ "-DVTK_USE_PARALLEL=ON " \ "-DPYTHON_EXECUTABLE=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DPYTHON_INCLUDE_PATH=%s " \ "-DVTK_USE_GUISUPPORT=ON " \ "-DVTK_USE_QT=ON " \ "-DVTK_USE_QVTK_QTOPENGL=ON " \ "-DVTK_WRAP_PYTHON=ON " \ "-DQT_MOC_EXECUTABLE=%s " \ "-DQT_QMAKE_EXECUTABLE=%s " \ "-DQT_UIC_EXECUTABLE=%s " \ % (self.inst_dir, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH, QT_MOC_EXECUTABLE, QT_QMAKE_EXECUTABLE, QT_UIC_EXECUTABLE) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure VTK. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("%s build already configured." % BASENAME) return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DTeem_DIR=%s " \ % \ (self.inst_dir,config.Teem_DIR) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure teem. Fix and try again.")
def configure_nt(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("DCMTK build already configured.") return # modify CMakeLists, changing occurrences of /MT # (multithreaded runtime options) into /MD (multithreaded DLL # runtime options) and /MTd into /MDd # we need to change this to match what we have in VTK os.chdir(self.build_dir) repls = [('\/MT', '/MD')] utils.re_sub_filter_file(repls, 'CMakeLists.txt') # then run cmake cmake_params = "-DCMAKE_INSTALL_PREFIX=%s " % (self.inst_dir, ) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure DCMTK. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("gdcm build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = \ "-DGDCM_BUILD_APPLICATIONS=OFF " \ "-DGDCM_BUILD_EXAMPLES=OFF " \ "-DGDCM_BUILD_SHARED_LIBS=ON " \ "-DGDCM_BUILD_TESTING=OFF " \ "-DGDCM_USE_ITK=OFF " \ "-DGDCM_USE_VTK=ON " \ "-DGDCM_USE_WXWIDGETS=OFF " \ "-DGDCM_WRAP_JAVA=OFF " \ "-DGDCM_WRAP_PHP=OFF " \ "-DGDCM_WRAP_PYTHON=ON " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DSWIG_DIR=%s " \ "-DSWIG_EXECUTABLE=%s " \ "-DVTK_DIR=%s " \ "-DPYTHON_EXECUTABLE=%s " \ "-DPYTHON_LIBRARY=%s " \ "-DPYTHON_INCLUDE_PATH=%s " % \ (self.inst_dir, config.SWIG_DIR, config.SWIG_EXECUTABLE, config.VTK_DIR, config.PYTHON_EXECUTABLE, config.PYTHON_LIBRARY, config.PYTHON_INCLUDE_PATH) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure GDCM. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("teem build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DTeem_ZLIB=ON " \ "-DBUILD_SHARED_LIBS=ON " \ "-DZLIB_INCLUDE_DIR=%s " \ "-DZLIB_LIBRARY=%s" \ % \ (self.inst_dir,os.path.join(config.ZLIB_INST_DIR,"include"),os.path.join(config.ZLIB_INST_DIR,self.lib_directory,self.lib_name+"."+self.lib_extensions),) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure teem. Fix and try again.")
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("%s build already configured." % BASENAME) return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = \ "-DCMAKE_BACKWARDS_COMPATIBILITY=2.6 " \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DITK_DIR=%s " \ '-DCMAKE_CXX_FLAGS="/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /bigobj" ' % ( self.inst_dir, config.ITK_DIR) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error("Could not configure %s. Fix and try again." % BASENAME)
def configure(self): if os.path.exists( os.path.join(self.build_dir, 'CMakeFiles/cmake.check_cache')): utils.output("teem build already configured.") return if not os.path.exists(self.build_dir): os.mkdir(self.build_dir) cmake_params = "-DCMAKE_BUILD_TYPE=RelWithDebInfo " \ "-DCMAKE_INSTALL_PREFIX=%s " \ "-DTeem_ZLIB=ON " \ "-DBUILD_SHARED_LIBS=ON " \ "-DZLIB_INCLUDE_DIR=%s " \ "-DZLIB_LIBRARY=%s" \ % \ (self.inst_dir,os.path.join(config.ZLIB_INST_DIR,"include"),os.path.join(config.ZLIB_INST_DIR,self.lib_directory,self.lib_name+"."+self.lib_extensions),) ret = utils.cmake_command(self.build_dir, self.source_dir, cmake_params) if ret != 0: utils.error( "Could not configure teem. Fix and try again.")