Cleanup: use UI_ prefix for block flag
[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
49 if(ENABLE_MINGW64)
50         if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
51                 include(cmake/setup_mingw64.cmake)
52         else()
53                 include(cmake/setup_mingw32.cmake)
54         endif()
55 else()
56         set(mingw_LIBDIR ${LIBDIR})
57 endif()
58
59 include(cmake/zlib.cmake)
60 include(cmake/blendthumb.cmake)
61 include(cmake/openal.cmake)
62 include(cmake/png.cmake)
63 include(cmake/jpeg.cmake)
64 include(cmake/boost.cmake)
65 include(cmake/blosc.cmake)
66 include(cmake/pthreads.cmake)
67 include(cmake/ilmbase.cmake)
68 include(cmake/openexr.cmake)
69 include(cmake/freetype.cmake)
70 include(cmake/freeglut.cmake)
71 include(cmake/glew.cmake)
72 include(cmake/alembic.cmake)
73 include(cmake/glfw.cmake)
74 include(cmake/clew.cmake)
75 include(cmake/cuew.cmake)
76 include(cmake/opensubdiv.cmake)
77 include(cmake/sdl.cmake)
78 include(cmake/opencollada.cmake)
79 include(cmake/opencolorio.cmake)
80 include(cmake/llvm.cmake)
81 include(cmake/clang.cmake)
82 if(APPLE)
83   include(cmake/openmp.cmake)
84 endif()
85 include(cmake/openimageio.cmake)
86 include(cmake/tiff.cmake)
87 include(cmake/flexbison.cmake)
88 include(cmake/osl.cmake)
89 include(cmake/tbb.cmake)
90 include(cmake/openvdb.cmake)
91 include(cmake/python.cmake)
92 include(cmake/python_site_packages.cmake)
93 include(cmake/numpy.cmake)
94 include(cmake/pugixml.cmake)
95
96 if(WITH_WEBP)
97         include(cmake/webp.cmake)
98 endif()
99 if(WIN32)
100         #hmd_branch_deps
101         include(cmake/hidapi.cmake)
102         #ocio deps
103         include(cmake/tinyxml.cmake)
104         include(cmake/yamlcpp.cmake)
105         #lcms is an ocio dep, but only if you build the apps, leaving it here for convenience
106         #include(cmake/lcms.cmake)
107 endif()
108
109 if(NOT WIN32 OR ENABLE_MINGW64)
110         include(cmake/openjpeg.cmake)
111         if(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                         if(NOT APPLE)
132                                 include(cmake/spnav.cmake)
133                                 include(cmake/jemalloc.cmake)
134                                 include(cmake/xml2.cmake)
135                         endif()
136                 endif()
137         endif()
138 endif()
139
140 if(UNIX AND NOT APPLE)
141         include(cmake/bzip2.cmake)
142         include(cmake/ffi.cmake)
143         include(cmake/lzma.cmake)
144         include(cmake/ssl.cmake)
145         include(cmake/sqlite.cmake)
146 endif()
147
148 include(cmake/harvest.cmake)