Commit 597db21d authored by Rashad Kanavath's avatar Rashad Kanavath

chime in freetype into superbuild for Qt4 and OSSIM

parent 5fb65c85
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()
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment