diff --git a/SuperBuild/CMake/External_freetype.cmake b/SuperBuild/CMake/External_freetype.cmake new file mode 100644 index 0000000000000000000000000000000000000000..230edf622b51c020c2dfd72d7bd0b66180450372 --- /dev/null +++ b/SuperBuild/CMake/External_freetype.cmake @@ -0,0 +1,37 @@ +set(proj FREETYPE) + +if(NOT __EXTERNAL_${proj}__) +set(__EXTERNAL_${proj}__ 1) + +message(STATUS "Setup freetype ...") + +if(USE_SYSTEM_FREETYPE) + find_package ( FreeType ) + message(STATUS " Using FreeType system version") +else() + SETUP_SUPERBUILD(PROJECT ${proj}) + message(STATUS " Using FreeType SuperBuild version") + + ExternalProject_Add(${proj} + PREFIX ${proj} + URL "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.gz" + URL_MD5 1d733ea6c1b7b3df38169fbdbec47d2b + BINARY_DIR ${FREETYPE_SB_BUILD_DIR} + INSTALL_DIR ${SB_INSTALL_PREFIX} + DOWNLOAD_DIR ${DOWNLOAD_LOCATION} + CMAKE_CACHE_ARGS + -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX} + -DCMAKE_BUILD_TYPE:STRING=Release + -DBUILD_SHARED_LIBS:BOOL=ON + CMAKE_COMMAND ${SB_CMAKE_COMMAND} + ) + + set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include) + if(WIN32) + set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/freetype.lib) + elseif(UNIX) + set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreetype${CMAKE_SHARED_LIBRARY_SUFFIX}) + endif() + +endif() +endif() diff --git a/SuperBuild/CMake/External_ossim.cmake b/SuperBuild/CMake/External_ossim.cmake index 79ae194284ebd222d7d0c5a2940e04a0b99ad5b1..20948d3bf68e676ee3fbad5728bb38b6355f116e 100644 --- a/SuperBuild/CMake/External_ossim.cmake +++ b/SuperBuild/CMake/External_ossim.cmake @@ -19,7 +19,7 @@ else() message(STATUS " Using OSSIM SuperBuild version") # declare dependencies - ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} TIFF GEOTIFF GEOS JPEG OPENTHREADS) + ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE) INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES}) # set proj back to its original value @@ -35,6 +35,8 @@ else() ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY) ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_INCLUDE_DIR) ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_LIBRARY) + ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_INCLUDE_DIR) + ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_LIBRARY) set(OSSIM_CXX_FLAGS -D__STDC_CONSTANT_MACROS) @@ -102,7 +104,7 @@ else() -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS} -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF - -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=OFF + -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON -DBUILD_OSSIM_APPS:BOOL=OFF -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF -DINSTALL_ARCHIVE_DIR:STRING=lib diff --git a/SuperBuild/CMake/External_otb.cmake b/SuperBuild/CMake/External_otb.cmake index 0ce43201b7cbd9c7370df0aa5729608874e39f9b..6342446f0063380997537a9957363bdf48b3042b 100644 --- a/SuperBuild/CMake/External_otb.cmake +++ b/SuperBuild/CMake/External_otb.cmake @@ -30,37 +30,38 @@ endif() ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} GDAL OSSIM ITK TINYXML BOOST) if(OTB_USE_CURL) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(CURL) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} CURL) endif() if(OTB_USE_LIBKML) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(LIBKML) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} LIBKML) endif() if(OTB_USE_OPENCV) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OPENCV) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} OPENCV) endif() if(OTB_USE_LIBSVM) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(LIBSVM) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} LIBSVM) endif() if(OTB_USE_MUPARSER) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MUPARSER) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} MUPARSER) endif() if(OTB_USE_MUPARSERX) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MUPARSERX) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} MUPARSERX) endif() if(OTB_WRAP_PYTHON OR OTB_WRAP_JAVA) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(SWIG) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} SWIG) endif() if(OTB_USE_QT4) -ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QT4) +ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} QT4) endif() + INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES}) # set proj back to its original value set(proj OTB) diff --git a/SuperBuild/CMake/External_qt4.cmake b/SuperBuild/CMake/External_qt4.cmake index 5362628f2ab3f1abd9e78039ead553b7afeaa71a..075d13b5112f2c75ddbc7df8de8990f25367a9da 100644 --- a/SuperBuild/CMake/External_qt4.cmake +++ b/SuperBuild/CMake/External_qt4.cmake @@ -20,7 +20,7 @@ else() endif() # declare dependencies - ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} ZLIB TIFF PNG SQLITE) + ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} ZLIB TIFF PNG SQLITE FREETYPE) INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES}) # set proj back to its original value diff --git a/SuperBuild/CMake/SuperBuild_Macro.cmake b/SuperBuild/CMake/SuperBuild_Macro.cmake index c861f2807b6676815ecf28a3d96633f6af2f685e..306539638302a47b0e93e2e33fef6b7c9a0d6586 100644 --- a/SuperBuild/CMake/SuperBuild_Macro.cmake +++ b/SuperBuild/CMake/SuperBuild_Macro.cmake @@ -65,7 +65,6 @@ macro(SETUP_SUPERBUILD) endmacro(SETUP_SUPERBUILD) macro(ADDTO_DEPENDENCIES_IF_NOT_SYSTEM proj) - set(${proj}_DEPENDENCIES) foreach(dep ${ARGN}) if(NOT USE_SYSTEM_${dep}) list(APPEND ${proj}_DEPENDENCIES ${dep})