[Bf-blender-cvs] [a04300c436d] blender-v3.1-release: Cleanup: Move more cmake library variables to be advanced

Sebastian Parborg noreply at git.blender.org
Thu Feb 17 18:43:49 CET 2022


Commit: a04300c436d77bf47b94d033c1d832d86425945c
Author: Sebastian Parborg
Date:   Thu Feb 17 18:42:06 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rBa04300c436d77bf47b94d033c1d832d86425945c

Cleanup: Move more cmake library variables to be advanced

I noticed that there were a few variables that should not be visible per default.
It seems to me to simply be an oversight, so I went ahead and cleaned them up.

Reviewed By: Sybren, Ray molenkamp

Differential Revision: http://developer.blender.org/D14132

===================================================================

M	build_files/cmake/Modules/FindFFmpeg.cmake
M	build_files/cmake/Modules/FindOSL.cmake
M	build_files/cmake/Modules/FindOpenColorIO.cmake
M	build_files/cmake/Modules/FindOpenImageDenoise.cmake
M	build_files/cmake/platform/platform_unix.cmake
M	source/blender/io/collada/CMakeLists.txt

===================================================================

diff --git a/build_files/cmake/Modules/FindFFmpeg.cmake b/build_files/cmake/Modules/FindFFmpeg.cmake
index 5f506a33e13..8d939f3ad85 100644
--- a/build_files/cmake/Modules/FindFFmpeg.cmake
+++ b/build_files/cmake/Modules/FindFFmpeg.cmake
@@ -82,4 +82,6 @@ mark_as_advanced(
 
 unset(_ffmpeg_SEARCH_DIRS)
 unset(_ffmpeg_LIBRARIES)
-unset(_ffmpeg_INCLUDE_DIR)
+# In cmake version 3.21 and up, we can instead use the NO_CACHE option for
+# find_path so we don't need to clear it from the cache here.
+unset(_ffmpeg_INCLUDE_DIR CACHE)
diff --git a/build_files/cmake/Modules/FindOSL.cmake b/build_files/cmake/Modules/FindOSL.cmake
index b21c7ad50a3..b67ce515ff5 100644
--- a/build_files/cmake/Modules/FindOSL.cmake
+++ b/build_files/cmake/Modules/FindOSL.cmake
@@ -76,6 +76,7 @@ FIND_PATH(OSL_SHADER_DIR
     /usr/include/OSL/
   PATH_SUFFIXES
     share/OSL/shaders
+    shaders
 )
 
 # handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
@@ -99,6 +100,7 @@ ENDIF()
 
 MARK_AS_ADVANCED(
   OSL_INCLUDE_DIR
+  OSL_SHADER_DIR
 )
 FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
   STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
diff --git a/build_files/cmake/Modules/FindOpenColorIO.cmake b/build_files/cmake/Modules/FindOpenColorIO.cmake
index 21118533ebe..8aa7795b611 100644
--- a/build_files/cmake/Modules/FindOpenColorIO.cmake
+++ b/build_files/cmake/Modules/FindOpenColorIO.cmake
@@ -87,12 +87,14 @@ ENDIF()
 MARK_AS_ADVANCED(
   OPENCOLORIO_INCLUDE_DIR
   OPENCOLORIO_LIBRARY
-  OPENCOLORIO_OPENCOLORIO_LIBRARY
-  OPENCOLORIO_TINYXML_LIBRARY
-  OPENCOLORIO_YAML-CPP_LIBRARY
   OPENCOLORIO_VERSION
 )
 
+FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
+  STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+  MARK_AS_ADVANCED(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
+ENDFOREACH()
+
 UNSET(COMPONENT)
 UNSET(UPPERCOMPONENT)
 UNSET(_opencolorio_FIND_COMPONENTS)
diff --git a/build_files/cmake/Modules/FindOpenImageDenoise.cmake b/build_files/cmake/Modules/FindOpenImageDenoise.cmake
index 3facadbb9be..6ad45c8cf61 100644
--- a/build_files/cmake/Modules/FindOpenImageDenoise.cmake
+++ b/build_files/cmake/Modules/FindOpenImageDenoise.cmake
@@ -110,6 +110,7 @@ ENDIF()
 
 MARK_AS_ADVANCED(
   OPENIMAGEDENOISE_INCLUDE_DIR
+  OPENIMAGEDENOISE_LIBRARY
 )
 
 FOREACH(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 6a896709cc2..95d0e4de380 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -362,6 +362,7 @@ if(WITH_BOOST)
       find_package(IcuLinux)
     endif()
     mark_as_advanced(Boost_DIR)  # why doesn't boost do this?
+    mark_as_advanced(Boost_INCLUDE_DIR)  # why doesn't boost do this?
   endif()
 
   set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
diff --git a/source/blender/io/collada/CMakeLists.txt b/source/blender/io/collada/CMakeLists.txt
index e1645083116..25c20accaa2 100644
--- a/source/blender/io/collada/CMakeLists.txt
+++ b/source/blender/io/collada/CMakeLists.txt
@@ -31,6 +31,10 @@ if(OPENCOLLADA_ANIMATION_CLIP)
   add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
 endif()
 
+# In cmake version 3.21 and up, we can instead use the NO_CACHE option for
+# find_file so we don't need to clear it from the cache here.
+unset(OPENCOLLADA_ANIMATION_CLIP CACHE)
+
 set(INC
   .
   ../../blenkernel



More information about the Bf-blender-cvs mailing list