diff --git a/CMakeExternals/PCRE.cmake b/CMakeExternals/PCRE.cmake index c8a37b69c9..5a70f9b497 100644 --- a/CMakeExternals/PCRE.cmake +++ b/CMakeExternals/PCRE.cmake @@ -1,69 +1,69 @@ #-------------------------------------------------------------------------- # PCRE (Perl Compatible Regular Expressions) #-------------------------------------------------------------------------- if(MITK_USE_PCRE) if(DEFINED PCRE_DIR AND NOT EXISTS ${PCRE_DIR}) message(FATAL_ERROR "PCRE_DIR variable is defined but corresponds to non-existing directory") endif() set(proj PCRE) set(${proj}_DEPENDENCIES "") set(${proj}_DEPENDS ${proj}) if(NOT PCRE_DIR) if(UNIX) # Some other projects (e.g. Swig) require a pcre-config script which is not # generated when using the CMake build system. set(configure_cmd CONFIGURE_COMMAND /./configure CC=${CMAKE_C_COMPILER}${CMAKE_C_COMPILER_ARG1} CFLAGS=-fPIC "CXXFLAGS=-fPIC ${MITK_CXX${MITK_CXX_STANDARD}_FLAG} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" "LDFLAGS=${CMAKE_LINKER_FLAGS} ${CMAKE_LINKER_FLAGS_RELEASE} ${_install_rpath_linkflag}" CXX=${CMAKE_CXX_COMPILER}${CMAKE_CXX_COMPILER_ARG1} --prefix= --disable-shared --enable-jit ) else() set(additional_cmake_args ) if(CTEST_USE_LAUNCHERS) list(APPEND additional_cmake_args "-DCMAKE_PROJECT_${proj}_INCLUDE:FILEPATH=${CMAKE_ROOT}/Modules/CTestUseLaunchers.cmake" ) endif() set(configure_cmd CMAKE_GENERATOR ${gen} CMAKE_GENERATOR_PLATFORM ${gen_platform} CMAKE_ARGS ${ep_common_args} ${additional_cmake_args} "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -fPIC" -DBUILD_SHARED_LIBS:BOOL=OFF -DPCRE_BUILD_PCREGREP:BOOL=OFF -DPCRE_BUILD_TESTS:BOOL=OFF -DPCRE_SUPPORT_JIT:BOOL=ON CMAKE_CACHE_ARGS ${ep_common_cache_args} CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args} ) endif() ExternalProject_add(${proj} LIST_SEPARATOR ${sep} - URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/pcre-8.35.tar.gz - URL_MD5 "ed58bcbe54d3b1d59e9f5415ef45ce1c" + URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/pcre-8.45.tar.gz + URL_MD5 "01b80f8177ab91da63e7e5c5d5dfcb83" ${configure_cmd} DEPENDS "${${proj}_DEPENDENCIES}" ) set(PCRE_DIR ${ep_prefix}) else() mitkMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}") endif() endif() diff --git a/CMakeExternals/SWIG.cmake b/CMakeExternals/SWIG.cmake index 7f91487f13..00c0bdbcb5 100644 --- a/CMakeExternals/SWIG.cmake +++ b/CMakeExternals/SWIG.cmake @@ -1,78 +1,78 @@ #------------------------------------------------------------ # SWIG (Simple Wrapper Interface Generator) #----------------------------------------------------------- if(MITK_USE_SWIG) if(DEFINED SWIG_DIR AND NOT EXISTS ${SWIG_DIR}) message(FATAL_ERROR "SWIG_DIR variable is defined but corresponds to non-existing directory") endif() set(SWIG_TARGET_VERSION 4.2.0) set(proj SWIG) if(WIN32) set(proj_DEPENDENCIES) else() set(proj_DEPENDENCIES PCRE) endif() set(SWIG_DEPENDS ${proj}) if(NOT SWIG_DIR) # We don't "install" SWIG in the common install prefix, # since it is only used as a tool during the MITK super-build # to generate the Python wrappings for some projects. # binary SWIG for windows if(WIN32) set(swig_source_dir ${CMAKE_CURRENT_BINARY_DIR}/swigwin-${SWIG_TARGET_VERSION}) # swig.exe available as pre-built binary on Windows: ExternalProject_Add(${proj} #URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/swigwin-${SWIG_TARGET_VERSION}.zip URL https://netcologne.dl.sourceforge.net/project/swig/swigwin/swigwin-4.2.0/swigwin-4.2.0.zip #URL_MD5 "009926b512aee9318546bdd4c7eab6f9" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" ) ExternalProject_Get_Property(${proj} source_dir) set(SWIG_DIR ${source_dir}) set(SWIG_EXECUTABLE ${source_dir}/swig.exe) else() # swig uses bison find it by cmake and pass it down find_package(BISON) set(BISON_FLAGS "" CACHE STRING "Flags used by bison") mark_as_advanced( BISON_FLAGS) ExternalProject_add(${proj} LIST_SEPARATOR ${sep} #URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/swig-${SWIG_TARGET_VERSION}.tar.gz - URL https://github.com/swig/swig/archive/refs/tags/v4.2.0.tar.gz + URL https://deac-ams.dl.sourceforge.net/project/swig/swig/swig-4.2.0/swig-4.2.0.tar.gz #URL_MD5 7c3e46cb5af2b469722cafa0d91e127b # Switching to Git would require additional prerequisites: # - autotools-dev # - automake # GIT_REPOSITORY https://github.com/swig/swig.git # GIT_TAG v${SWIG_TARGET_VERSION} INSTALL_DIR ${ep_prefix}/src/${proj}-install CONFIGURE_COMMAND /./configure CC=${CMAKE_C_COMPILER}${CMAKE_C_COMPILER_ARG1} LDFLAGS=${CMAKE_LINKER_FLAGS} ${CMAKE_LINKER_FLAGS_RELEASE} CXX=${CMAKE_CXX_COMPILER}${CMAKE_CXX_COMPILER_ARG1} "--prefix=" "--with-pcre-prefix=${PCRE_DIR}" --without-octave "--with-python=${Python3_EXECUTABLE}" DEPENDS ${proj_DEPENDENCIES} ) ExternalProject_Get_Property(${proj} install_dir) set(SWIG_DIR ${install_dir}/share/swig/${SWIG_TARGET_VERSION}) set(SWIG_EXECUTABLE ${install_dir}/bin/swig) endif() else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() endif()