[Bf-blender-cvs] [f9fb9bb] alembic_basic_io: Cleanup: Alembic and HDF5 CMake modules.
Kévin Dietrich
noreply at git.blender.org
Fri Jul 1 19:20:28 CEST 2016
Commit: f9fb9bb03f7647ca45a799ae40f3a58b77c562df
Author: Kévin Dietrich
Date: Fri Jul 1 19:20:14 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rBf9fb9bb03f7647ca45a799ae40f3a58b77c562df
Cleanup: Alembic and HDF5 CMake modules.
- Remove references to Samplerate
- Copyright year
- hdf5_hl requirement removed in Alembic 1.6.0
Patch by @ejnersan.
===================================================================
M build_files/cmake/Modules/FindAlembic.cmake
M build_files/cmake/Modules/FindHDF5.cmake
===================================================================
diff --git a/build_files/cmake/Modules/FindAlembic.cmake b/build_files/cmake/Modules/FindAlembic.cmake
index bce4eba..1f61b5e 100644
--- a/build_files/cmake/Modules/FindAlembic.cmake
+++ b/build_files/cmake/Modules/FindAlembic.cmake
@@ -1,16 +1,16 @@
# - Find Alembic library
# Find the native Alembic includes and libraries
# This module defines
-# ALEMBIC_INCLUDE_DIRS, where to find samplerate.h, Set when
+# ALEMBIC_INCLUDE_DIRS, where to find Alembic headers, Set when
# ALEMBIC_INCLUDE_DIR is found.
-# ALEMBIC_LIBRARIES, libraries to link against to use Samplerate.
-# ALEMBIC_ROOT_DIR, The base directory to search for Samplerate.
+# ALEMBIC_LIBRARIES, libraries to link against to use Alembic.
+# ALEMBIC_ROOT_DIR, The base directory to search for Alembic.
# This can also be an environment variable.
-# ALEMBIC_FOUND, If false, do not try to use Samplerate.
+# ALEMBIC_FOUND, If false, do not try to use Alembic.
#
#=============================================================================
-# Copyright 2011 Blender Foundation.
+# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -66,3 +66,5 @@ MARK_AS_ADVANCED(
ALEMBIC_INCLUDE_DIR
ALEMBIC_LIBRARY
)
+
+UNSET(_alembic_SEARCH_DIRS)
diff --git a/build_files/cmake/Modules/FindHDF5.cmake b/build_files/cmake/Modules/FindHDF5.cmake
index 9f99666..56ceda8 100644
--- a/build_files/cmake/Modules/FindHDF5.cmake
+++ b/build_files/cmake/Modules/FindHDF5.cmake
@@ -1,16 +1,15 @@
-# - Find Alembic library
-# Find the native Alembic includes and libraries
+# - Find HDF5 library
+# Find the native HDF5 includes and libraries
# This module defines
-# HDF5_INCLUDE_DIRS, where to find samplerate.h, Set when
-# HDF5_INCLUDE_DIR is found.
-# HDF5_LIBRARIES, libraries to link against to use Samplerate.
-# HDF5_ROOT_DIR, The base directory to search for Samplerate.
-# This can also be an environment variable.
-# HDF5_FOUND, If false, do not try to use Samplerate.
+# HDF5_INCLUDE_DIRS, where to find hdf5.h, Set when HDF5_INCLUDE_DIR is found.
+# HDF5_LIBRARIES, libraries to link against to use HDF5.
+# HDF5_ROOT_DIR, The base directory to search for HDF5.
+# This can also be an environment variable.
+# HDF5_FOUND, If false, do not try to use HDF5.
#
#=============================================================================
-# Copyright 2011 Blender Foundation.
+# Copyright 2016 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -34,9 +33,13 @@ SET(_hdf5_SEARCH_DIRS
/opt/lib/hdf5
)
-SET(_hdf5_FIND_COMPONENTS
- hdf5
- hdf5_hl
+FIND_LIBRARY(HDF5_LIBRARY
+ NAMES
+ hdf5
+ HINTS
+ ${_hdf5_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
)
FIND_PATH(HDF5_INCLUDE_DIR
@@ -48,29 +51,13 @@ FIND_PATH(HDF5_INCLUDE_DIR
include
)
-SET(_hdf5_LIBRARIES)
-FOREACH(COMPONENT ${_hdf5_FIND_COMPONENTS})
- STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
-
- FIND_LIBRARY(${UPPERCOMPONENT}_LIBRARY
- NAMES
- ${COMPONENT}
- HINTS
- ${_hdf5_SEARCH_DIRS}
- PATH_SUFFIXES
- lib64 lib
- )
- MARK_AS_ADVANCED(${UPPERCOMPONENT}_LIBRARY)
- LIST(APPEND _hdf5_LIBRARIES "${${UPPERCOMPONENT}_LIBRARY}")
-ENDFOREACH()
-
# handle the QUIETLY and REQUIRED arguments and set HDF5_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG _hdf5_LIBRARIES HDF5_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG HDF5_LIBRARY HDF5_INCLUDE_DIR)
IF(HDF5_FOUND)
- SET(HDF5_LIBRARIES ${_hdf5_LIBRARIES})
+ SET(HDF5_LIBRARIES ${HDF5_LIBRARY})
SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
ENDIF(HDF5_FOUND)
@@ -79,6 +66,4 @@ MARK_AS_ADVANCED(
HDF5_LIBRARY
)
-UNSET(COMPONENT)
-UNSET(UPPERCOMPONENT)
-UNSET(_hdf5_LIBRARIES)
+UNSET(_hdf5_SEARCH_DIRS)
More information about the Bf-blender-cvs
mailing list