Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r--build_files/cmake/macros.cmake47
1 files changed, 47 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 10f89797754..c9a04f87148 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -165,6 +165,12 @@ macro(SETUP_LIBDIRS)
if(WITH_IMAGE_TIFF)
link_directories(${TIFF_LIBPATH})
endif()
+ if(WITH_BOOST)
+ link_directories(${BOOST_LIBPATH})
+ endif()
+ if(WITH_OPENIMAGEIO)
+ link_directories(${OPENIMAGEIO_LIBPATH})
+ endif()
if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
link_directories(${OPENJPEG_LIBPATH})
endif()
@@ -259,6 +265,12 @@ macro(setup_liblinks
if(WITH_IMAGE_TIFF)
target_link_libraries(${target} ${TIFF_LIBRARY})
endif()
+ if(WITH_OPENIMAGEIO)
+ target_link_libraries(${target} ${OPENIMAGEIO_LIBRARIES})
+ endif()
+ if(WITH_BOOST)
+ target_link_libraries(${target} ${BOOST_LIBRARIES})
+ endif()
if(WITH_IMAGE_OPENEXR)
if(WIN32 AND NOT UNIX)
file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
@@ -618,3 +630,38 @@ macro(blender_project_hack_post)
endif()
endmacro()
+
+# pair of macros to allow libraries to be specify files to install, but to
+# only install them at the end so the directories don't get cleared with
+# the files in them. used by cycles to install addon.
+macro(delayed_install
+ base
+ files
+ destination)
+
+ foreach(f ${files})
+ set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_FILES ${base}/${f})
+ set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
+ endforeach()
+endmacro()
+
+# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
+# does not get expanded in calling but is preserved
+function(delayed_do_install
+ targetdir)
+
+ get_property(files GLOBAL PROPERTY DELAYED_INSTALL_FILES)
+ get_property(destinations GLOBAL PROPERTY DELAYED_INSTALL_DESTINATIONS)
+
+ if(files)
+ list(LENGTH files n)
+ math(EXPR n "${n}-1")
+
+ foreach(i RANGE ${n})
+ list(GET files ${i} f)
+ list(GET destinations ${i} d)
+ install(FILES ${f} DESTINATION ${targetdir}/${d})
+ endforeach()
+ endif()
+endfunction()
+