blendthumb.cmake 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # ***** BEGIN GPL LICENSE BLOCK *****
  2. #
  3. # This program is free software; you can redistribute it and/or
  4. # modify it under the terms of the GNU General Public License
  5. # as published by the Free Software Foundation; either version 2
  6. # of the License, or (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software Foundation,
  15. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16. #
  17. # ***** END GPL LICENSE BLOCK *****
  18. if(BUILD_MODE STREQUAL Release)
  19. if(WIN32)
  20. set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
  21. ExternalProject_Add(external_zlib_32
  22. URL ${ZLIB_URI}
  23. CMAKE_GENERATOR ${GENERATOR_32}
  24. URL_HASH MD5=${ZLIB_HASH}
  25. DOWNLOAD_DIR ${DOWNLOAD_DIR}
  26. PREFIX ${BUILD_DIR}/zlib32
  27. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
  28. INSTALL_DIR ${LIBDIR}/zlib32
  29. )
  30. ExternalProject_Add(external_zlib_64
  31. URL ${ZLIB_URI}
  32. CMAKE_GENERATOR ${GENERATOR_64}
  33. URL_HASH MD5=${ZLIB_HASH}
  34. DOWNLOAD_DIR ${DOWNLOAD_DIR}
  35. PREFIX ${BUILD_DIR}/zlib64
  36. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
  37. INSTALL_DIR ${LIBDIR}/zlib64
  38. )
  39. ExternalProject_Add(external_blendthumb_32
  40. CMAKE_GENERATOR ${GENERATOR_32}
  41. SOURCE_DIR ${THUMB_DIR}
  42. PREFIX ${BUILD_DIR}/blendthumb32
  43. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
  44. INSTALL_DIR ${LIBDIR}/blendthumb32
  45. )
  46. add_dependencies(
  47. external_blendthumb_32
  48. external_zlib_32
  49. )
  50. ExternalProject_Add(external_blendthumb_64
  51. CMAKE_GENERATOR ${GENERATOR_64}
  52. SOURCE_DIR ${THUMB_DIR}
  53. PREFIX ${BUILD_DIR}/blendthumb64
  54. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
  55. INSTALL_DIR ${LIBDIR}/blendthumb64
  56. )
  57. add_dependencies(
  58. external_blendthumb_64
  59. external_zlib_64
  60. )
  61. endif()
  62. endif()