Merge branch 'master' into blender2.8
[blender.git] / build_files / build_environment / CMakeLists.txt
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 #
21 # This is a build system used by platform maintainers to build library dependencies on
22 # Windows and macOS. There is some support for Linux as well, but not ready for releases.
23 #
24 # Windows and macOS users should download the precompiled libraries in lib/, Linux users
25 # should run install_deps.sh for building dependencies.
26 #
27 # WINDOWS USAGE:
28 #   Don't call this cmake file your self, use build_deps.cmd
29 #   build_deps 2013 x64 / build_deps 2013 x86
30 #   build_deps 2015 x64 / build_deps 2015 x86
31 #
32 # MAC OS X USAGE:
33 #       Install with homebrew: brew install autoconf automake libtool yasm openssl xz
34 #   Run "make deps" from main Blender directory
35 #
36 # LINUX USAGE:
37 #   Install compiler, cmake, autoconf, automake, libtool, yasm
38 #   Run "make deps" from main Blender directory
39 #
40 ####################################################################################################
41
42 project("BlenderDependencies")
43 cmake_minimum_required(VERSION 3.5)
44
45 include(ExternalProject)
46 include(cmake/options.cmake)
47 include(cmake/versions.cmake)
48 include(cmake/zlib.cmake)
49 include(cmake/blendthumb.cmake)
50 include(cmake/openal.cmake)
51 include(cmake/png.cmake)
52 include(cmake/jpeg.cmake)
53 include(cmake/boost.cmake)
54 include(cmake/blosc.cmake)
55 include(cmake/pthreads.cmake)
56 include(cmake/ilmbase.cmake)
57 include(cmake/openexr.cmake)
58 include(cmake/freetype.cmake)
59 include(cmake/freeglut.cmake)
60 include(cmake/glew.cmake)
61 include(cmake/hdf5.cmake)
62 include(cmake/alembic.cmake)
63 include(cmake/glfw.cmake)
64 include(cmake/clew.cmake)
65 include(cmake/cuew.cmake)
66 include(cmake/opensubdiv.cmake)
67 include(cmake/sdl.cmake)
68 include(cmake/opencollada.cmake)
69 include(cmake/opencolorio.cmake)
70 include(cmake/llvm.cmake)
71 include(cmake/clang.cmake)
72 include(cmake/openimageio.cmake)
73 include(cmake/tiff.cmake)
74 include(cmake/flexbison.cmake)
75 include(cmake/osl.cmake)
76 include(cmake/tbb.cmake)
77 include(cmake/openvdb.cmake)
78 include(cmake/python.cmake)
79 include(cmake/python_site_packages.cmake)
80 include(cmake/numpy.cmake)
81 if(WITH_WEBP)
82         include(cmake/webp.cmake)
83 endif()
84 if(WIN32)
85         include(cmake/hidapi.cmake)
86 endif()
87
88 if(ENABLE_MINGW64)
89         if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
90                 include(cmake/setup_mingw64.cmake)
91         else()
92                 include(cmake/setup_mingw32.cmake)
93         endif()
94 else()
95         set(mingw_LIBDIR ${LIBDIR})
96 endif()
97
98 if(NOT WIN32 OR ENABLE_MINGW64)
99         include(cmake/openjpeg.cmake)
100         if(BUILD_MODE STREQUAL Release)
101                 if(WIN32)
102                         include(cmake/zlib_mingw.cmake)
103                 endif()
104                 include(cmake/lame.cmake)
105                 include(cmake/ogg.cmake)
106                 include(cmake/vorbis.cmake)
107                 include(cmake/theora.cmake)
108                 include(cmake/vpx.cmake)
109                 include(cmake/orc.cmake)
110                 include(cmake/schroedinger.cmake)
111                 include(cmake/x264.cmake)
112                 include(cmake/xvidcore.cmake)
113                 include(cmake/faad.cmake)
114                 include(cmake/ffmpeg.cmake)
115                 include(cmake/fftw.cmake)
116                 include(cmake/sndfile.cmake)
117                 if(WIN32)
118                         include(cmake/iconv.cmake)
119                         include(cmake/lapack.cmake)
120                 endif()
121                 if(UNIX)
122                         include(cmake/flac.cmake)
123                         if(NOT APPLE)
124                                 include(cmake/spnav.cmake)
125                                 include(cmake/jemalloc.cmake)
126                                 include(cmake/xml2.cmake)
127                         endif()
128                 endif()
129         endif()
130 endif()
131
132 include(cmake/harvest.cmake)