Cleanup split creator.c
[blender-staging.git] / source / creator / 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 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 setup_libdirs()
27
28 blender_include_dirs(
29         ../../intern/guardedalloc
30         ../../intern/glew-mx
31         ../blender/blenlib
32         ../blender/blenkernel
33         ../blender/blenloader
34         ../blender/depsgraph
35         ../blender/editors/include
36         ../blender/makesrna
37         ../blender/imbuf
38         ../blender/render/extern/include
39         ../blender/makesdna
40         ../blender/gpu
41         ../blender/windowmanager
42 )
43
44 add_definitions(${GL_DEFINITIONS})
45 blender_include_dirs("${GLEW_INCLUDE_PATH}")
46
47 if(WIN32)
48         blender_include_dirs(../../intern/utfconv)
49 endif()
50
51 if(WITH_LIBMV)
52         blender_include_dirs(../../intern/libmv)
53         add_definitions(-DWITH_LIBMV)
54 endif()
55
56 if(WITH_CYCLES AND WITH_CYCLES_LOGGING)
57         blender_include_dirs(../../intern/cycles/blender)
58         add_definitions(-DWITH_CYCLES_LOGGING)
59 endif()
60
61 if(WITH_CODEC_FFMPEG)
62         add_definitions(-DWITH_FFMPEG)
63 endif()
64
65 if(WITH_PYTHON)
66         blender_include_dirs(../blender/python)
67         add_definitions(-DWITH_PYTHON)
68
69         if(WITH_PYTHON_SECURITY)
70                 add_definitions(-DWITH_PYTHON_SECURITY)
71         endif()
72 endif()
73
74 if(WITH_HEADLESS)
75         add_definitions(-DWITH_HEADLESS)
76 endif()
77
78 if(WITH_GAMEENGINE)
79         blender_include_dirs(../gameengine/BlenderRoutines)
80
81         add_definitions(-DWITH_GAMEENGINE)
82 endif()
83
84 if(WITH_SDL)
85         if(WITH_SDL_DYNLOAD)
86                 add_definitions(-DWITH_SDL_DYNLOAD)
87                 blender_include_dirs(../../extern/sdlew/include)
88         endif()
89         add_definitions(-DWITH_SDL)
90 endif()
91
92 if(WITH_BINRELOC)
93         add_definitions(-DWITH_BINRELOC)
94         blender_include_dirs(${BINRELOC_INCLUDE_DIRS})
95 endif()
96
97 if(WITH_FREESTYLE)
98         add_definitions(-DWITH_FREESTYLE)
99         blender_include_dirs(../blender/freestyle)
100 endif()
101
102 # Setup the exe sources and buildinfo
103 set(SRC
104         creator.c
105         creator_args.c
106         creator_signals.c
107
108         creator_intern.h
109 )
110
111 # MSVC 2010 gives linking errors with the manifest
112 if(WIN32 AND NOT UNIX)
113         string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1)
114         string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2)
115         string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3)
116         if(MINGW)
117                 add_definitions(
118                         -DWINDRES
119                         -DBLEN_VER_RC_STR_M=${BLENDER_VERSION}
120                         -DBLEN_VER_RC_1=${bver1}
121                         -DBLEN_VER_RC_2=${bver2}
122                         -DBLEN_VER_RC_3=${bver3}
123                         -DBLEN_VER_RC_4=0
124                 )
125         else()
126                 add_definitions(
127                         -DBLEN_VER_RC_STR=${BLENDER_VERSION}
128                         -DBLEN_VER_RC_1=${bver1}
129                         -DBLEN_VER_RC_2=${bver2}
130                         -DBLEN_VER_RC_3=${bver3}
131                         -DBLEN_VER_RC_4=0
132                 )
133         endif()
134
135
136         list(APPEND SRC
137                 ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc
138         )
139 endif()
140
141 if(WITH_BUILDINFO)
142         add_definitions(-DWITH_BUILDINFO)
143         # --------------------------------------------------------------------------
144         # These defines could all be moved into the header below
145         string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}")
146         string(REPLACE " " "\ " BUILDINFO_CXXFLAGS "${CMAKE_CXX_FLAGS}")
147         string(REPLACE " " "\ " BUILDINFO_LINKFLAGS "${PLATFORM_LINKFLAGS}")
148         add_definitions(
149                 # # define in header now, else these get out of date on rebuilds.
150                 # -DBUILD_DATE="${BUILD_DATE}"
151                 # -DBUILD_TIME="${BUILD_TIME}"
152                 # -DBUILD_COMMIT_TIMESTAMP="${BUILD_COMMIT_TIMESTAMP}"
153                 # -DBUILD_COMMIT_TIME="${BUILD_COMMIT_TIME}"
154                 # -DBUILD_COMMIT_DATE="${BUILD_COMMIT_DATE}"
155                 # -DBUILD_HASH="${BUILD_HASH}"
156                 # -DBUILD_BRANCH="${BUILD_BRANCH}"
157                 -DWITH_BUILDINFO_HEADER # alternative to lines above
158                 -DBUILD_PLATFORM="${CMAKE_SYSTEM_NAME}"
159                 -DBUILD_TYPE="${CMAKE_BUILD_TYPE}"
160                 -DBUILD_CFLAGS="${BUILDINFO_CFLAGS}"
161                 -DBUILD_CXXFLAGS="${BUILDINFO_CXXFLAGS}"
162                 -DBUILD_LINKFLAGS="${BUILDINFO_LINKFLAGS}"
163                 -DBUILD_SYSTEM="CMake"
164         )
165
166         # --------------------------------------------------------------------------
167         # write header for values that change each build
168         # note, generaed file is in build dir's source/creator
169         #       except when used as an include path.
170
171         # include the output directory, where the buildinfo.h file is generated
172         include_directories(${CMAKE_CURRENT_BINARY_DIR})
173
174
175         # XXX, "_buildinfo.h" is used twice here,
176         # because we rely on that file being detected as missing
177         # every build so that the real header "buildinfo.h" is updated.
178         #
179         # Keep this until we find a better way to resolve!
180
181         # a custom target that is always built
182         add_custom_target(buildinfo ALL
183                 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_buildinfo.h)
184
185         # creates buildinfo.h using cmake script
186         add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_buildinfo.h
187                 COMMAND ${CMAKE_COMMAND}
188                 -DSOURCE_DIR=${CMAKE_SOURCE_DIR}
189                 -P ${CMAKE_SOURCE_DIR}/build_files/cmake/buildinfo.cmake)
190
191         # buildinfo.h is a generated file
192         set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h
193                 PROPERTIES GENERATED TRUE
194                 HEADER_FILE_ONLY TRUE)
195
196         # add deps below, after adding blender
197         # -------------- done with header values.
198
199         list(APPEND SRC
200                 buildinfo.c
201         )
202
203         # make an object library so can load with it in tests
204         add_library(buildinfoobj OBJECT buildinfo.c)
205         add_dependencies(buildinfoobj buildinfo)
206 endif()
207
208 # message(STATUS "Configuring blender")
209 if(WITH_PYTHON_MODULE)
210         add_definitions(-DWITH_PYTHON_MODULE)
211
212         # creates ./bin/bpy.so which can be imported as a python module.
213         #
214         # note that 'SHARED' works on Linux and Windows,
215         # but not OSX which _must_ be 'MODULE'
216         add_library(blender MODULE ${SRC})
217         set_target_properties(
218                 blender
219                 PROPERTIES
220                         PREFIX ""
221                         OUTPUT_NAME bpy
222                         LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
223                         RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin  # only needed on windows
224         )
225
226         if(APPLE)
227                 set_target_properties(
228                         blender
229                         PROPERTIES
230                                 MACOSX_BUNDLE
231                                 LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}"
232                                 LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}"
233                 )
234         endif()
235
236         if(WIN32)
237                 # python modules use this
238                 set_target_properties(
239                         blender
240                         PROPERTIES
241                         SUFFIX ".pyd"
242                 )
243         endif()
244
245 else()
246         add_executable(blender ${EXETYPE} ${SRC})
247 endif()
248
249 if(WITH_BUILDINFO)
250         # explicitly say that the executable depends on the buildinfo
251         add_dependencies(blender buildinfo)
252 endif()
253
254
255 set(BLENDER_TEXT_FILES
256         ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
257         ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt
258         ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
259         ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
260         ${CMAKE_SOURCE_DIR}/release/text/jemalloc-license.txt
261         # generate this file
262         # ${CMAKE_SOURCE_DIR}/release/text/readme.html
263         ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt
264 )
265
266 if(WITH_INTERNATIONAL)
267         list(APPEND BLENDER_TEXT_FILES
268                 ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-droidsans.ttf.txt
269                 ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bmonofont-i18n.ttf.txt
270         )
271 endif()
272
273
274 # -----------------------------------------------------------------------------
275 # Platform Specific Var: TARGETDIR_VER
276
277 if(UNIX AND NOT APPLE)
278         if(WITH_PYTHON_MODULE)
279                 if(WITH_INSTALL_PORTABLE)
280                         set(TARGETDIR_VER ${BLENDER_VERSION})
281                 else()
282                         set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION})
283                 endif()
284         else()
285                 if(WITH_INSTALL_PORTABLE)
286                         set(TARGETDIR_VER ${BLENDER_VERSION})
287                 else()
288                         set(TARGETDIR_VER share/blender/${BLENDER_VERSION})
289                 endif()
290         endif()
291
292 elseif(WIN32)
293         set(TARGETDIR_VER ${BLENDER_VERSION})
294
295 elseif(APPLE)
296         if(WITH_PYTHON_MODULE)
297                 set(TARGETDIR_VER ${BLENDER_VERSION})
298         else()
299                 set(TARGETDIR_VER blender.app/Contents/Resources/${BLENDER_VERSION})
300         endif()
301         # Skip relinking on cpack / install
302         set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true)
303 endif()
304
305
306 # -----------------------------------------------------------------------------
307 # Install Targets (Generic, All Platforms)
308
309
310 # important to make a clean  install each time, else old scripts get loaded.
311 install(
312         CODE
313         "file(REMOVE_RECURSE ${TARGETDIR_VER})"
314 )
315
316 if(WITH_PYTHON)
317         # install(CODE "message(\"copying blender scripts...\")")
318         
319         # exclude addons_contrib if release
320         if("${BLENDER_VERSION_CYCLE}" STREQUAL "release")
321                 set(ADDON_EXCLUDE_CONDITIONAL "addons_contrib/*")
322         else()
323                 set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*")  # dummy, wont do anything
324         endif()
325
326         # do not install freestyle dir if disabled
327         if(NOT WITH_FREESTYLE)
328                 set(FREESTYLE_EXCLUDE_CONDITIONAL "freestyle/*")
329         else()
330                 set(FREESTYLE_EXCLUDE_CONDITIONAL "_freestyle/*")  # dummy, wont do anything
331         endif()
332
333         install(
334                 DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
335                 DESTINATION ${TARGETDIR_VER}
336                 PATTERN ".git" EXCLUDE
337                 PATTERN "__pycache__" EXCLUDE
338                 PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE
339                 PATTERN "${FREESTYLE_EXCLUDE_CONDITIONAL}" EXCLUDE
340         )
341         
342         unset(ADDON_EXCLUDE_CONDITIONAL)
343         unset(FREESTYLE_EXCLUDE_CONDITIONAL)
344 endif()
345
346 # localization
347 if(WITH_INTERNATIONAL)
348         install(
349                 DIRECTORY
350                         ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
351                 DESTINATION ${TARGETDIR_VER}/datafiles
352         )
353
354         set(_locale_dir "${CMAKE_SOURCE_DIR}/release/datafiles/locale")
355         set(_locale_target_dir ${TARGETDIR_VER}/datafiles/locale)
356
357         file(GLOB _po_files "${_locale_dir}/po/*.po")
358         foreach(_po_file ${_po_files})
359                 msgfmt_simple(${_po_file} _all_mo_files)
360         endforeach()
361
362         # Create a custom target which will compile all po to mo
363         add_custom_target(
364                 locales
365                 DEPENDS ${_all_mo_files})
366
367         add_dependencies(blender locales)
368
369         # Generate INSTALL rules
370         install(
371                 FILES ${_locale_dir}/languages
372                 DESTINATION ${_locale_target_dir}
373         )
374
375         foreach(_mo_file ${_all_mo_files})
376                 get_filename_component(_locale_name ${_mo_file} NAME_WE)
377                 install(
378                         FILES ${_mo_file}
379                         DESTINATION ${_locale_target_dir}/${_locale_name}/LC_MESSAGES
380                         RENAME blender.mo
381                 )
382                 unset(_locale_name)
383         endforeach()
384
385         unset(_all_mo_files)
386         unset(_po_files)
387         unset(_po_file)
388         unset(_mo_file)
389         unset(_locale_target_dir)
390
391         unset(_locale_dir)
392 endif()
393
394 # color management
395 if(WITH_OPENCOLORIO)
396         install(
397                 DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/colormanagement
398                 DESTINATION ${TARGETDIR_VER}/datafiles
399         )
400 endif()
401
402 # helpful tip when using make
403 if("${CMAKE_GENERATOR}" MATCHES ".*Makefiles.*")
404         # message after building.
405         add_custom_command(
406                 TARGET blender POST_BUILD MAIN_DEPENDENCY blender
407                 COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files and scripts to ${TARGETDIR_VER}'
408         )
409 endif()
410
411
412 # -----------------------------------------------------------------------------
413 # Install Targets (Platform Specific)
414
415 if(UNIX AND NOT APPLE)
416
417         if(NOT WITH_PYTHON_MODULE)
418                 if(WITH_DOC_MANPAGE)
419                         add_custom_target(
420                                 blender_man_page ALL
421                                 COMMAND ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py
422                                         ${EXECUTABLE_OUTPUT_PATH}/blender
423                                         ${CMAKE_CURRENT_BINARY_DIR}/blender.1)
424                         add_dependencies(blender_man_page blender)
425                 endif()
426         endif()
427
428         # there are a few differences between portable and system install
429         if(WITH_PYTHON_MODULE)
430                 if(WITH_INSTALL_PORTABLE)
431                         install(
432                                 TARGETS blender
433                                 DESTINATION "."
434                         )
435                 else()
436                         install(
437                                 TARGETS blender
438                                 LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}
439                         )
440                 endif()
441                 # none of the other files are needed currently
442         elseif(WITH_INSTALL_PORTABLE)
443                 install(
444                         TARGETS blender
445                         DESTINATION "."
446                 )
447
448                 if(WITH_DOC_MANPAGE)
449                         install(
450                                 FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1
451                                 DESTINATION "."
452                         )
453                 endif()
454                 install(
455                         FILES
456                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
457                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
458                         DESTINATION "."
459                 )
460
461                 install(
462                         PROGRAMS
463                         ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
464                         DESTINATION "."
465                 )
466
467                 set(BLENDER_TEXT_FILES_DESTINATION ".")
468         else()
469                 # main blender binary
470                 install(
471                         TARGETS blender
472                         DESTINATION bin
473                 )
474                 if(WITH_DOC_MANPAGE)
475                         # manpage only with 'blender' binary
476                         install(
477                                 FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1
478                                 DESTINATION share/man/man1
479                         )
480                 endif()
481
482                 # misc files
483                 install(
484                         FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
485                         DESTINATION share/applications
486                 )
487                 install(
488                         DIRECTORY
489                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/16x16
490                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/22x22
491                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/24x24
492                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/32x32
493                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/48x48
494                                 ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/256x256
495                         DESTINATION share/icons/hicolor
496                         PATTERN "*.svg" EXCLUDE
497                 )
498                 install(
499                         FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
500                         DESTINATION share/icons/hicolor/scalable/apps
501                 )
502                 install(
503                         PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
504                         DESTINATION bin
505                 )
506                 set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender)
507         endif()
508
509         if(WITH_PYTHON)
510                 if(WITH_PYTHON_INSTALL)
511
512                         install(
513                                 PROGRAMS ${PYTHON_EXECUTABLE}
514                                 DESTINATION ${TARGETDIR_VER}/python/bin
515                         )
516
517                         # on some platforms (like openSUSE) Python is linked
518                         # to be used from lib64 folder.
519                         # determine this from Python's libraries path
520                         #
521                         # ugh, its possible 'lib64' is just a symlink to 'lib' which causes incorrect use of 'lib64'
522                         get_filename_component(_pypath_real ${PYTHON_LIBPATH} REALPATH)
523                         if(${_pypath_real} MATCHES "lib64$")
524                                 set(_target_LIB "lib64")
525                         else()
526                                 set(_target_LIB "lib")
527                         endif()
528                         unset(_pypath_real)
529
530                         # Copy the systems python into the install directory
531                         # install(CODE "message(\"copying a subset of the systems python...\")")
532                         install(
533                                 DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION}
534                                 DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}
535                                 PATTERN "__pycache__" EXCLUDE               # * any cache *
536                                 PATTERN "distutils" EXCLUDE                 # ./distutils
537                                 PATTERN "lib2to3" EXCLUDE                   # ./lib2to3
538                                 PATTERN "config" EXCLUDE                    # ./config
539                                 PATTERN "config-*" EXCLUDE                  # ./config-*
540                                 PATTERN "site-packages/*" EXCLUDE           # ./site-packages/*
541                                 PATTERN "tkinter" EXCLUDE                   # ./tkinter
542                                 PATTERN "lib-dynload/_tkinter.*" EXCLUDE    # ./lib-dynload/_tkinter.co
543                                 PATTERN "idlelib" EXCLUDE                   # ./idlelib
544                                 PATTERN "test" EXCLUDE                      # ./test
545                                 PATTERN "turtledemo" EXCLUDE                # ./turtledemo
546                                 PATTERN "turtle.py" EXCLUDE                 # ./turtle.py
547                         )
548
549                         # # doesnt work, todo
550                         # install(CODE "execute_process(COMMAND find ${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
551
552                         if(WITH_PYTHON_INSTALL_NUMPY)
553                                 # Install to the same directory as the source, so debian-like
554                                 # distros are happy with their policy.
555                                 set(_suffix "site-packages")
556                                 if(${PYTHON_NUMPY_PATH} MATCHES "dist-packages")
557                                         set(_suffix "dist-packages")
558                                 endif()
559                                 install(
560                                         DIRECTORY ${PYTHON_NUMPY_PATH}/numpy
561                                         DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
562                                         PATTERN ".svn" EXCLUDE
563                                         PATTERN "__pycache__" EXCLUDE           # * any cache *
564                                         PATTERN "*.pyc" EXCLUDE                 # * any cache *
565                                         PATTERN "*.pyo" EXCLUDE                 # * any cache *
566                                         PATTERN "distutils" EXCLUDE             # ./distutils
567                                         PATTERN "oldnumeric" EXCLUDE            # ./oldnumeric
568                                         PATTERN "doc" EXCLUDE                   # ./doc
569                                         PATTERN "tests" EXCLUDE                 # ./tests
570                                         PATTERN "f2py" EXCLUDE                  # ./f2py - fortran/python interface code, not fun for blender devs.
571                                         PATTERN "include" EXCLUDE               # include dirs all over, we wont use NumPy/CAPI
572                                         PATTERN "*.h" EXCLUDE                   # some includes are not in include dirs
573                                         PATTERN "*.a" EXCLUDE                   # ./core/lib/libnpymath.a - for linking, we dont need.
574                                 )
575                                 unset(_suffix)
576                         endif()
577
578                         # Copy requests, we need to generalize site-packages
579                         if(WITH_PYTHON_INSTALL_REQUESTS)
580                                 set(_suffix "site-packages")
581                                 if(${PYTHON_REQUESTS_PATH} MATCHES "dist-packages")
582                                         set(_suffix "dist-packages")
583                                 endif()
584                                 install(
585                                         DIRECTORY ${PYTHON_REQUESTS_PATH}/requests
586                                         DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
587                                         PATTERN ".svn" EXCLUDE
588                                         PATTERN "__pycache__" EXCLUDE           # * any cache *
589                                         PATTERN "*.pyc" EXCLUDE                 # * any cache *
590                                         PATTERN "*.pyo" EXCLUDE                 # * any cache *
591                                         PATTERN "cacert.pem" EXCLUDE            # for now we don't deal with security
592                                 )
593                                 # On some platforms requests does have extra dependencies.
594                                 set(_requests_deps "chardet" "urllib3")
595                                 foreach(_requests_dep ${_requests_deps})
596                                         if(EXISTS ${PYTHON_REQUESTS_PATH}/${_requests_dep})
597                                                 install(
598                                                         DIRECTORY ${PYTHON_REQUESTS_PATH}/${_requests_dep}
599                                                         DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
600                                                         PATTERN ".svn" EXCLUDE
601                                                         PATTERN "__pycache__" EXCLUDE           # * any cache *
602                                                         PATTERN "*.pyc" EXCLUDE                 # * any cache *
603                                                         PATTERN "*.pyo" EXCLUDE                 # * any cache *
604                                                 )
605                                         endif()
606                                 endforeach()
607                                 if(EXISTS ${PYTHON_REQUESTS_PATH}/six.py)
608                                         install(
609                                                 FILES ${PYTHON_REQUESTS_PATH}/six.py
610                                                 DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
611                                         )
612                                         endif()
613                                 unset(_requests_dep)
614                                 unset(_requests_deps)
615                                 unset(_suffix)
616                         endif()
617                         unset(_target_LIB)
618                         
619                 endif()
620         endif()
621 elseif(WIN32)
622
623         set(BLENDER_TEXT_FILES_DESTINATION ".")
624
625         if(WITH_PYTHON)
626                 string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
627
628                 # MinGW TODO: This bit of Python configuration diverges from MSVC
629                 if(NOT CMAKE_COMPILER_IS_GNUCC)
630                         install(
631                                 FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.dll
632                                 DESTINATION "."
633                                 CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
634                         )
635
636                         install(
637                                 FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll
638                                 DESTINATION "."
639                                 CONFIGURATIONS Debug
640                         )
641                 endif()
642
643                 if(WITH_PYTHON_INSTALL)
644                         # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags.
645
646                         install(DIRECTORY DESTINATION ${TARGETDIR_VER}/python)
647                         install(DIRECTORY DESTINATION ${TARGETDIR_VER}/python/lib)
648
649                         # WARNING: its important that 'CMAKE_INSTALL_CONFIG_NAME' is evaluated at build time
650                         # and _NOT_ configuration time, when modifying the lines below,
651                         # check it works in both Release & Debug mode.
652                         #
653                         # Edit with extreme care! - Campbell
654
655                         # extract python
656                         install(
657                                 CODE
658                                 "
659                                 message(STATUS \"Extracting Python to: \${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python\")
660                                 if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")
661                                         set(PYTHON_ZIP \"${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_d.tar.gz\")
662                                 else()
663                                         set(PYTHON_ZIP \"${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}.tar.gz\")
664                                 endif()
665
666                                 execute_process(
667                                         COMMAND \${CMAKE_COMMAND} -E make_directory
668                                                 \"\${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python\"
669                                         COMMAND \${CMAKE_COMMAND} -E
670                                                 chdir \"\${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python\"
671                                                 \${CMAKE_COMMAND} -E
672                                                 tar xzfv \"\${PYTHON_ZIP}\"
673                                 )
674                                 unset(PYTHON_ZIP)
675                                 "
676                         )
677
678                         # release/site-packages
679                         install(
680                                 DIRECTORY ${LIBDIR}/release/site-packages
681                                 DESTINATION ${BLENDER_VERSION}/python/lib
682                                 PATTERN ".svn" EXCLUDE
683                                 PATTERN "__pycache__" EXCLUDE           # * any cache *
684                                 PATTERN "*.pyc" EXCLUDE                 # * any cache *
685                                 PATTERN "*.pyo" EXCLUDE                 # * any cache *)
686                         )
687
688                         if(WITH_PYTHON_INSTALL_NUMPY)
689                                 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
690                                         COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages)
691
692                                 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
693                                         COMMAND ${CMAKE_COMMAND} -E tar xzvf "${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_1.9.tar.gz"
694                                         DEPENDS ${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_1.9.tar.gz
695                                                 ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
696                                         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages)
697                                 add_custom_target(python_numpy ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy)
698                                 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
699                                                 DESTINATION ${BLENDER_VERSION}/python/lib/site-packages)
700                         endif()
701
702
703                         # TODO(sergey): For unti we've got better way to deal with python binary
704                         install(
705                                 FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.dll
706                                 DESTINATION ${BLENDER_VERSION}/python/bin
707                                 CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
708                         )
709                         install(
710                                 FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll
711                                 DESTINATION ${BLENDER_VERSION}/python/bin
712                                 CONFIGURATIONS Debug
713                         )
714
715                         # MinGW needs Python DLL
716                         if(MINGW)
717                                 install(
718                                         FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.dll
719                                         DESTINATION "."
720                                         CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
721                                 )
722                                 install(
723                                         FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll
724                                         DESTINATION "."
725                                         CONFIGURATIONS Debug
726                                 )
727                         endif()
728                 endif()
729
730                 unset(_PYTHON_VERSION_NO_DOTS)
731         endif()
732
733         # EGL Runtime Components
734         if(WITH_GL_EGL)
735                 if(WIN32)
736                         install(FILES "${OPENGLES_DLL}"     DESTINATION ".")
737                         install(FILES "${OPENGLES_EGL_DLL}" DESTINATION ".")
738
739                         if(WITH_GL_ANGLE)
740                                 install(FILES "${D3DCOMPILER_DLL}" DESTINATION ".")
741                         endif()
742                 endif()
743         endif()
744
745         if(MSVC)
746                 install(
747                         FILES ${LIBDIR}/pthreads/lib/pthreadVC2.dll
748                         DESTINATION "."
749                 )
750         else()
751                 #MinGW64 comes with own version. For portable builds it will probaly have to be copied to work
752                 if(NOT WITH_MINGW64)
753                         install(
754                                 FILES ${LIBDIR}/pthreads/lib/pthreadGC2.dll
755                                 DESTINATION "."
756                         )
757                 elseif(WITH_MINGW64)
758                         install(
759                                 FILES 
760                                         ${LIBDIR}/binaries/libgcc_s_sjlj-1.dll
761                                         ${LIBDIR}/binaries/libwinpthread-1.dll
762                                         ${LIBDIR}/binaries/libstdc++-6.dll
763                                 DESTINATION "."
764                         )
765                         
766                         if(WITH_OPENMP)
767                                 install(
768                                         FILES 
769                                         ${LIBDIR}/binaries/libgomp-1.dll
770                                         DESTINATION "."
771                                 )
772                         endif()
773                 endif()
774         endif()
775
776         if(WITH_CODEC_FFMPEG)
777                 if(WITH_MINGW64)
778                         install(
779                                 FILES
780                                         ${LIBDIR}/ffmpeg/lib/avcodec-53.dll
781                                         ${LIBDIR}/ffmpeg/lib/avformat-53.dll
782                                         ${LIBDIR}/ffmpeg/lib/avdevice-53.dll
783                                         ${LIBDIR}/ffmpeg/lib/avutil-51.dll
784                                         ${LIBDIR}/ffmpeg/lib/swscale-2.dll
785                                         ${LIBDIR}/ffmpeg/lib/swresample-0.dll
786                                         ${LIBDIR}/ffmpeg/lib/xvidcore.dll
787                                 DESTINATION "."
788                         )
789                 else()
790                         install(
791                                 FILES
792                                         ${LIBDIR}/ffmpeg/lib/avcodec-55.dll
793                                         ${LIBDIR}/ffmpeg/lib/avformat-55.dll
794                                         ${LIBDIR}/ffmpeg/lib/avdevice-55.dll
795                                         ${LIBDIR}/ffmpeg/lib/avutil-52.dll
796                                         ${LIBDIR}/ffmpeg/lib/swscale-2.dll
797                                 DESTINATION "."
798                         )
799                 endif()
800         endif()
801
802         if(WITH_CODEC_SNDFILE)
803                 install(
804                         FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll
805                         DESTINATION "."
806                 )
807         endif()
808
809         if(WITH_OPENAL)
810                 install(
811                         FILES
812                                 ${LIBDIR}/openal/lib/OpenAL32.dll
813                         DESTINATION "."
814                 )
815                 # MinGW TODO: Need to update to a newer OpenAL version
816                 # which does not depend on wrap_oal.dll
817                 if(CMAKE_COMPILER_IS_GNUCC)
818                         install(
819                                 FILES
820                                         ${LIBDIR}/openal/lib/wrap_oal.dll
821                                 DESTINATION "."
822                         )
823                 endif()
824         endif()
825
826         if(WITH_SDL)
827                 #MinGW TODO: Update to SDL2
828                 if(NOT CMAKE_COMPILER_IS_GNUCC)
829                         install(
830                                 FILES ${LIBDIR}/sdl/lib/SDL2.dll
831                                 DESTINATION "."
832                         )
833                 else()
834                         install(
835                                 FILES ${LIBDIR}/sdl/lib/SDL.dll
836                                 DESTINATION "."
837                         )
838                 endif()
839         endif()
840         
841         if(WITH_SYSTEM_AUDASPACE)
842                 install(
843                         FILES
844                                 ${LIBDIR}/audaspace/lib/audaspace.dll
845                                 ${LIBDIR}/audaspace/lib/audaspace-c.dll
846                                 ${LIBDIR}/audaspace/lib/audaspace-py.dll
847                         DESTINATION "."
848                 )
849         endif()
850
851         if(NOT CMAKE_CL_64)
852                 install(
853                         FILES ${LIBDIR}/thumbhandler/lib/BlendThumb.dll
854                         DESTINATION "."
855                 )
856         endif()
857                 
858         install( # x86 builds can run on x64 Windows, so this is required at all times
859                 FILES ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll
860                 DESTINATION "."
861         )
862
863         if(WITH_OPENCOLORIO)
864                 set(OCIOBIN ${LIBDIR}/opencolorio/bin)
865                 if(NOT MINGW)
866                         install(
867                                 FILES
868                                         ${OCIOBIN}/OpenColorIO.dll
869                                 DESTINATION "."
870                         )
871                 else()
872                         install(
873                                 FILES
874                                         ${OCIOBIN}/libOpenColorIO.dll
875                                 DESTINATION "."
876                         )
877                 endif()
878         endif()
879
880 elseif(APPLE)
881
882         # handy install macro to exclude files, we use \$ escape for the "to"
883         # argument when calling so ${BUILD_TYPE} does not get expanded
884         macro(install_dir from to)
885                 install(
886                         DIRECTORY ${from}
887                         DESTINATION ${to}
888                         PATTERN ".git" EXCLUDE
889                         PATTERN ".svn" EXCLUDE
890                         PATTERN "*.pyc" EXCLUDE
891                         PATTERN "*.pyo" EXCLUDE
892                         PATTERN "*.orig" EXCLUDE
893                         PATTERN "*.rej" EXCLUDE
894                         PATTERN "__pycache__" EXCLUDE
895                         PATTERN "__MACOSX" EXCLUDE
896                         PATTERN ".DS_Store" EXCLUDE
897                 )
898         endmacro()
899
900         set(OSX_APP_SOURCEDIR ${CMAKE_SOURCE_DIR}/release/darwin/blender.app)
901
902         # setup Info.plist
903         execute_process(COMMAND date "+%Y-%m-%d"
904                         OUTPUT_VARIABLE BLENDER_DATE
905                         OUTPUT_STRIP_TRAILING_WHITESPACE)
906
907         set_target_properties(blender PROPERTIES
908                 MACOSX_BUNDLE_INFO_PLIST ${OSX_APP_SOURCEDIR}/Contents/Info.plist
909                 MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
910                 MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}")
911
912         # Gather the date in finder-style
913         execute_process(COMMAND date "+%m/%d/%Y/%H:%M"
914         OUTPUT_VARIABLE SETFILE_DATE
915         OUTPUT_STRIP_TRAILING_WHITESPACE)
916
917         # Give the bundle actual creation/modification date
918         execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE} ${EXECUTABLE_OUTPUT_PATH}/blender.app)
919
920         install(
921                 TARGETS blender
922                 DESTINATION "."
923         )
924
925         # install release and app files
926         set(BLENDER_TEXT_FILES_DESTINATION ".")
927
928         install(
929                 FILES ${OSX_APP_SOURCEDIR}/Contents/PkgInfo
930                 DESTINATION blender.app/Contents
931         )
932
933         install_dir(
934                 ${OSX_APP_SOURCEDIR}/Contents/Resources
935                 blender.app/Contents/
936         )
937
938         if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
939                 install(
940                         FILES ${LIBDIR}/openmp/lib/libiomp5.dylib
941                         DESTINATION blender.app/Contents/Resources/lib/
942                 )
943                 install(
944                         FILES ${LIBDIR}/openmp/LICENSE.txt
945                         DESTINATION "."
946                         RENAME LICENSE-libiomp5.txt
947                 )
948         endif()
949
950         if(WITH_LLVM AND NOT LLVM_STATIC)
951                 install(
952                         FILES ${LIBDIR}/llvm/lib/libLLVM-3.4.dylib
953                         DESTINATION blender.app/Contents/MacOS
954                 )
955         endif()
956
957         # python
958         if(WITH_PYTHON AND NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
959                 # the python zip is first extract as part of the build process,
960                 # and then later installed as part of make install. this is much
961                 # quicker, and means we can easily exclude files on copy
962                 # Not needed for PYTHON_MODULE or WEB_PLUGIN due uses  Pyhon framework
963                 add_custom_target(
964                         extractpyzip
965                         DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python)
966
967                 set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
968
969                 add_custom_command(
970                         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
971                         COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/python/"
972                         COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/python/"
973                         COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/python/"
974                                 ${CMAKE_COMMAND} -E tar xzfv "${LIBDIR}/release/${PYTHON_ZIP}"
975                         DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
976
977                 add_dependencies(blender extractpyzip)
978
979                 # copy extracted python files
980                 install_dir(
981                         ${CMAKE_CURRENT_BINARY_DIR}/python
982                         \${TARGETDIR_VER}
983                 )
984                 # copy site-packages files
985                 install_dir(
986                         ${LIBDIR}/release/site-packages
987                         ${CMAKE_CURRENT_BINARY_DIR}/python/lib/python${PYTHON_VERSION}
988                 )
989
990                 install(DIRECTORY ${LIBDIR}/python/bin
991                         DESTINATION ${TARGETDIR_VER}/python
992                         USE_SOURCE_PERMISSIONS
993                 )
994         endif()
995         
996         # install blenderplayer bundle - copy of blender.app above. re-using macros et al
997         # note we are using OSX Bundle as base and copying Blender dummy bundle on top of it
998         if(WITH_GAMEENGINE AND WITH_PLAYER)
999                 set(OSX_APP_PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/release/darwin/blenderplayer.app)
1000                 set(PLAYER_SOURCEINFO ${OSX_APP_PLAYER_SOURCEDIR}/Contents/Info.plist)
1001                 set(PLAYER_TARGETDIR_VER blenderplayer.app/Contents/Resources/${BLENDER_VERSION})
1002
1003
1004                 # important to make a clean  install each time else old scripts get loaded.
1005                 install(
1006                         CODE
1007                         "file(REMOVE_RECURSE ${PLAYER_TARGETDIR_VER})"
1008                 )
1009
1010                 # Give the bundle actual creation/modification date
1011                 execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE} ${EXECUTABLE_OUTPUT_PATH}/blenderplayer.app)
1012
1013                 install(
1014                         FILES ${OSX_APP_PLAYER_SOURCEDIR}/Contents/PkgInfo
1015                         DESTINATION blenderplayer.app/Contents
1016                 )
1017
1018                 install_dir(
1019                         ${OSX_APP_PLAYER_SOURCEDIR}/Contents/Resources
1020                         blenderplayer.app/Contents/
1021                 )
1022
1023                 if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
1024                 install(
1025                 FILES ${LIBDIR}/openmp/lib/libiomp5.dylib
1026                 DESTINATION blenderplayer.app/Contents/Resources/lib/
1027                 )
1028                 endif()
1029
1030
1031                 # python
1032                 if(WITH_PYTHON AND NOT WITH_PYTHON_FRAMEWORK)
1033                         add_custom_command(
1034                                 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
1035                                 COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/python/"
1036                                 COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/python/"
1037                                 COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/python/"
1038                                         ${CMAKE_COMMAND} -E tar xzfv "${LIBDIR}/release/${PYTHON_ZIP}"
1039                                 DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
1040
1041                         # copy extracted python files
1042                         install_dir(
1043                                 ${CMAKE_CURRENT_BINARY_DIR}/python
1044                                 \${PLAYER_TARGETDIR_VER}
1045                         )
1046                 endif()
1047
1048         endif()
1049
1050 endif()
1051
1052 # -----------------------------------------------------------------------------
1053 # Generic Install, for all targets
1054
1055 if(DEFINED BLENDER_TEXT_FILES_DESTINATION)
1056
1057         install(
1058                 CODE
1059                 "
1060                 file(READ \"${CMAKE_SOURCE_DIR}/release/text/readme.html\" DATA_SRC)
1061                 string(REGEX REPLACE \"BLENDER_VERSION\" \"${BLENDER_VERSION}\" DATA_DST \"\${DATA_SRC}\")
1062                 file(WRITE \"${CMAKE_BINARY_DIR}/release/text/readme.html\" \"\${DATA_DST}\")
1063                 unset(DATA_SRC)
1064                 unset(DATA_DST)
1065                 "
1066         )
1067         list(APPEND BLENDER_TEXT_FILES
1068                 ${CMAKE_BINARY_DIR}/release/text/readme.html
1069         )
1070
1071         install(
1072                 FILES ${BLENDER_TEXT_FILES}
1073                 DESTINATION "${BLENDER_TEXT_FILES_DESTINATION}"
1074         )
1075 endif()
1076
1077 # install more files specified elsewhere
1078 delayed_do_install(${TARGETDIR_VER})
1079
1080 unset(BLENDER_TEXT_FILES)
1081 unset(BLENDER_TEXT_FILES_DESTINATION)
1082
1083
1084 # -----------------------------------------------------------------------------
1085 # Setup link libs
1086
1087 add_dependencies(blender makesdna)
1088
1089 setup_blender_sorted_libs()
1090 target_link_libraries(blender ${BLENDER_SORTED_LIBS})
1091
1092 setup_liblinks(blender)
1093
1094 # -----------------------------------------------------------------------------
1095 # Setup launcher
1096
1097 if(WIN32 AND NOT WITH_PYTHON_MODULE)
1098         set(LAUNCHER_SRC
1099                 creator_launch_win.c
1100                 ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc
1101         )
1102         add_executable(blender-launcher ${LAUNCHER_SRC})
1103         target_link_libraries(blender-launcher bf_intern_utfconv ${PLATFORM_LINKLIBS})
1104
1105         set_target_properties(blender PROPERTIES OUTPUT_NAME blender-app)
1106         set_target_properties(blender-launcher PROPERTIES OUTPUT_NAME blender)
1107
1108         install(TARGETS blender blender-launcher
1109                         COMPONENT Blender
1110                         DESTINATION ".")
1111
1112         if(MSVC12_REDIST_DIR)
1113                 if(CMAKE_CL_64)
1114                         set(_WIN_PLATFORM x64)
1115                 else()
1116                         set(_WIN_PLATFORM x86)
1117                 endif()
1118                 install(
1119                         FILES ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.CRT/msvcp120.dll
1120                                   ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.CRT/msvcr120.dll
1121                 DESTINATION ".")
1122                 if(WITH_OPENMP)
1123                         install(
1124                                 FILES ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.OpenMP/vcomp120.dll
1125                                 DESTINATION ".")
1126                 endif()
1127         endif()
1128 endif()