Commit 7bcec268 authored by Rashad Kanavath's avatar Rashad Kanavath

Superbuild: use nmake for windows. will get cmake later

parent 0f826802
......@@ -40,10 +40,12 @@ else()
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/jconfigint.h.in ${JPEG_SB_SRC}/win/
DEPENDERS configure)
endif()
if(UNIX)
ExternalProject_Add_Step(${proj} patch_setmode
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/patches/${proj}/patch.cmake
DEPENDERS configure)
WORKING_DIRECTORY ${JPEG_SB_SRC}
DEPENDEES update)
endif()
......
......@@ -20,15 +20,49 @@ else()
set(proj TIFF)
set(TIFF_SB_CONFIG)
if(NOT USE_SYSTEM_ZLIB)
list(APPEND TIFF_SB_CONFIG "--with-zlib-include-dir=${SB_INSTALL_PREFIX}/include")
list(APPEND TIFF_SB_CONFIG "--with-zlib-lib-dir=${SB_INSTALL_PREFIX}/lib")
endif()
if(NOT USE_SYSTEM_JPEG)
list(APPEND TIFF_SB_CONFIG "--with-jpeg-include-dir=${SB_INSTALL_PREFIX}/include")
list(APPEND TIFF_SB_CONFIG "--with-jpeg-lib-dir=${SB_INSTALL_PREFIX}/lib")
endif()
ADD_SUPERBUILD_CMAKE_VAR(ZLIB_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(ZLIB_LIBRARY)
ADD_SUPERBUILD_CMAKE_VAR(JPEG_INCLUDE_DIR)
ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)
if(MSVC)
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
configure_file(${CMAKE_SOURCE_DIR}/patches/${proj}/nmake.opt ${CMAKE_BINARY_DIR}/nmake_libtiff_extra.opt)
ExternalProject_Add(${proj}_build
PREFIX ${proj}
URL "http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz"
URL_MD5 d1d2e940dea0b5ad435f21f03d96dd72
SOURCE_DIR ${TIFF_SB_SRC}
BINARY_DIR ${TIFF_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
DEPENDS ${${proj}_DEPENDENCIES}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/nmake_libtiff_extra.opt ${TIFF_SB_SRC}/nmake.opt
CONFIGURE_COMMAND ""
BUILD_COMMAND nmake /f ${TIFF_SB_SRC}/Makefile.vc
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt
${CMAKE_BINARY_DIR}/${proj}/_install
)
ExternalProject_Add(${proj}
PREFIX ${proj}/_install
DOWNLOAD_COMMAND ""
SOURCE_DIR ${proj}/_install
BINARY_DIR ${TIFF_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
-DTIFF_BUILD_DIR:STRING=${TIFF_SB_SRC}/libtiff
DEPENDS ${proj}_build
CMAKE_COMMAND
)
else()
ExternalProject_Add(${proj}
PREFIX ${proj}
URL "http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz"
......@@ -45,7 +79,7 @@ else()
-DBUILD_TESTING:BOOL=OFF
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
endif()
set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libtiff_i.lib)
......
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