CMakeLists.txt 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. ####################################################################################################
  19. #
  20. # This is a build system used by platform maintainers to build library dependencies on
  21. # Windows, macOS and Linux.
  22. #
  23. # For users building Blender, we recommend using the precompiled libraries from lib/ on
  24. # Windows and macOS, and install_deps.sh on Linux.
  25. #
  26. # WINDOWS USAGE:
  27. # Don't call this cmake file yourself, use build_deps.cmd
  28. # build_deps 2013 x64 / build_deps 2013 x86
  29. # build_deps 2015 x64 / build_deps 2015 x86
  30. #
  31. # MAC OS X USAGE:
  32. # Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
  33. # Run "make deps" from main Blender directory
  34. #
  35. # LINUX USAGE:
  36. # Install compiler cmake autoconf automake libtool yasm nasm tcl
  37. # Run "make deps" from main Blender directory
  38. #
  39. ####################################################################################################
  40. project("BlenderDependencies")
  41. cmake_minimum_required(VERSION 3.5)
  42. include(ExternalProject)
  43. include(cmake/options.cmake)
  44. include(cmake/versions.cmake)
  45. if(ENABLE_MINGW64)
  46. if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  47. include(cmake/setup_mingw64.cmake)
  48. else()
  49. include(cmake/setup_mingw32.cmake)
  50. endif()
  51. else()
  52. set(mingw_LIBDIR ${LIBDIR})
  53. endif()
  54. include(cmake/zlib.cmake)
  55. include(cmake/blendthumb.cmake)
  56. include(cmake/openal.cmake)
  57. include(cmake/png.cmake)
  58. include(cmake/jpeg.cmake)
  59. include(cmake/boost.cmake)
  60. include(cmake/blosc.cmake)
  61. include(cmake/pthreads.cmake)
  62. include(cmake/ilmbase.cmake)
  63. include(cmake/openexr.cmake)
  64. include(cmake/freetype.cmake)
  65. include(cmake/freeglut.cmake)
  66. include(cmake/glew.cmake)
  67. include(cmake/alembic.cmake)
  68. include(cmake/glfw.cmake)
  69. include(cmake/clew.cmake)
  70. include(cmake/cuew.cmake)
  71. include(cmake/opensubdiv.cmake)
  72. include(cmake/sdl.cmake)
  73. include(cmake/opencollada.cmake)
  74. include(cmake/opencolorio.cmake)
  75. include(cmake/llvm.cmake)
  76. include(cmake/clang.cmake)
  77. if(APPLE)
  78. include(cmake/openmp.cmake)
  79. endif()
  80. include(cmake/openimageio.cmake)
  81. include(cmake/tiff.cmake)
  82. include(cmake/flexbison.cmake)
  83. include(cmake/osl.cmake)
  84. include(cmake/tbb.cmake)
  85. include(cmake/openvdb.cmake)
  86. include(cmake/python.cmake)
  87. include(cmake/python_site_packages.cmake)
  88. include(cmake/numpy.cmake)
  89. if(UNIX AND NOT APPLE)
  90. # Rely on PugiXML compiled with OpenImageIO
  91. else()
  92. include(cmake/pugixml.cmake)
  93. endif()
  94. if(WITH_WEBP)
  95. include(cmake/webp.cmake)
  96. endif()
  97. if(WITH_EMBREE)
  98. include(cmake/embree.cmake)
  99. endif()
  100. if(WIN32)
  101. # HMD branch deps
  102. include(cmake/hidapi.cmake)
  103. # OCIO deps
  104. include(cmake/tinyxml.cmake)
  105. include(cmake/yamlcpp.cmake)
  106. # LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
  107. #include(cmake/lcms.cmake)
  108. endif()
  109. if(NOT WIN32 OR ENABLE_MINGW64)
  110. include(cmake/openjpeg.cmake)
  111. if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
  112. if(WIN32)
  113. include(cmake/zlib_mingw.cmake)
  114. endif()
  115. include(cmake/lame.cmake)
  116. include(cmake/ogg.cmake)
  117. include(cmake/vorbis.cmake)
  118. include(cmake/theora.cmake)
  119. include(cmake/vpx.cmake)
  120. include(cmake/x264.cmake)
  121. include(cmake/xvidcore.cmake)
  122. include(cmake/faad.cmake)
  123. include(cmake/ffmpeg.cmake)
  124. include(cmake/fftw.cmake)
  125. include(cmake/sndfile.cmake)
  126. if(WIN32)
  127. include(cmake/iconv.cmake)
  128. endif()
  129. if(UNIX)
  130. include(cmake/flac.cmake)
  131. include(cmake/xml2.cmake)
  132. if(NOT APPLE)
  133. include(cmake/spnav.cmake)
  134. include(cmake/jemalloc.cmake)
  135. endif()
  136. endif()
  137. endif()
  138. endif()
  139. if(UNIX)
  140. include(cmake/bzip2.cmake)
  141. include(cmake/ffi.cmake)
  142. include(cmake/lzma.cmake)
  143. include(cmake/ssl.cmake)
  144. include(cmake/sqlite.cmake)
  145. endif()
  146. include(cmake/harvest.cmake)