webp.cmake 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. # Note the utility apps may use png/tiff/gif system libraries, but the
  19. # library itself does not depend on them, so should give no problems.
  20. set(WEBP_EXTRA_ARGS
  21. -DWEBP_HAVE_SSE2=ON
  22. -DWEBP_HAVE_SSE41=OFF
  23. -DWEBP_HAVE_AVX2=OFF
  24. )
  25. if(WIN32)
  26. set(WEBP_BUILD_DIR ${BUILD_MODE}/)
  27. else()
  28. set(WEBP_BUILD_DIR)
  29. endif()
  30. ExternalProject_Add(external_webp
  31. URL ${WEBP_URI}
  32. DOWNLOAD_DIR ${DOWNLOAD_DIR}
  33. URL_HASH MD5=${WEBP_HASH}
  34. PREFIX ${BUILD_DIR}/webp
  35. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
  36. INSTALL_DIR ${LIBDIR}/webp
  37. )