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:
authorSebastian Parborg <darkdefende@gmail.com>2019-08-19 16:19:41 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-08-19 16:21:44 +0300
commit45a09de9ddf2de1fb09e4939c4180dbf94f7c3df (patch)
treeeb02d5a211ef5d884246989ae452b15cdaaae6c2
parent04f9c795aae6a70693fbf5eac880cffe26036cf3 (diff)
Fix building with shared OIDN libraries
Previously cmake would error out if it couldn't find the static libraries even though it can build with shared libraries just fine.
-rw-r--r--build_files/cmake/Modules/FindOpenImageDenoise.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/build_files/cmake/Modules/FindOpenImageDenoise.cmake b/build_files/cmake/Modules/FindOpenImageDenoise.cmake
index 85ba10b14e4..1ffbd052211 100644
--- a/build_files/cmake/Modules/FindOpenImageDenoise.cmake
+++ b/build_files/cmake/Modules/FindOpenImageDenoise.cmake
@@ -46,6 +46,10 @@ FIND_PATH(OPENIMAGEDENOISE_INCLUDE_DIR
SET(_openimagedenoise_FIND_COMPONENTS
OpenImageDenoise
+)
+
+# These are needed when building statically
+SET(_openimagedenoise_FIND_STATIC_COMPONENTS
common
mkldnn
)
@@ -65,6 +69,23 @@ FOREACH(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
LIST(APPEND _openimagedenoise_LIBRARIES "${OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
+FOREACH(COMPONENT ${_openimagedenoise_FIND_STATIC_COMPONENTS})
+ STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ FIND_LIBRARY(openimagedenoise_${UPPERCOMPONENT}_LIBRARY
+ NAMES
+ ${COMPONENT}
+ HINTS
+ ${_openimagedenoise_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ )
+ MARK_AS_ADVANCED(openimagedenoise_${UPPERCOMPONENT}_LIBRARY)
+ IF(openimagedenoise_${UPPERCOMPONENT}_LIBRARY)
+ LIST(APPEND _openimagedenoise_LIBRARIES "${OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY}")
+ ENDIF()
+ENDFOREACH()
+
FIND_LIBRARY(OPENIMAGEDENOISE_LIBRARY
NAMES
OpenImageDenoise