@@ -52,34 +52,26 @@ option(EbsdLib_ENABLE_HDF5 "Enable HDF5 Support in the EbsdLibProj" ON)
52
52
option (EbsdLib_BUILD_H5SUPPORT "Build H5Support Library" ON )
53
53
54
54
if (EbsdLib_ENABLE_HDF5 )
55
- if (EbsdLib_Anaconda_Install )
56
- set (HDF5_USE_STATIC_LIBRARIES OFF )
57
- set (HDF5_FIND_COMPONENTS OFF )
58
- find_package (HDF5 1.10.6 EXACT MODULE REQUIRED )
59
- set (HDF5_C_TARGET_NAME hdf5::hdf5 )
60
- else ()
61
- find_package (HDF5 NAMES hdf5 REQUIRED )
62
- endif ()
63
-
64
- # If H5Support already exists no need to look for it (e.g. EbsdLib is added as a subdirectory in DREAM3D)
65
- if (NOT TARGET H5Support::H5Support AND EbsdLib_BUILD_H5SUPPORT )
66
- #------------------------------------------------------------------------------
67
- # If the developer has set another H5Support directory then use that, otherwise look
68
- # for the H5Support directory at the same level as the EBSDLib directory
69
- if ("${H5Support_SOURCE_DIR} " STREQUAL "" )
70
- if (EXISTS "${EbsdLib_PARENT} /H5Support" )
71
- set (H5Support_SOURCE_DIR "${EbsdLib_PARENT} /H5Support" )
72
- elseif (EXISTS "${EbsdLib_SOURCE_DIR} /H5Support" )
73
- set (H5Support_SOURCE_DIR "${EbsdLib_SOURCE_DIR} /H5Support" )
74
- else ()
75
- message (FATAL_ERROR "H5Support_SOURCE_DIR was not set. Where is the H5Support project directory. Please set the H5Support_SOURCE_DIR variable to the CMP directory." )
55
+ if (EbsdLib_BUILD_H5SUPPORT )
56
+ if (NOT TARGET H5Support::H5Support )
57
+ #------------------------------------------------------------------------------
58
+ # If the developer has set another H5Support directory then use that, otherwise look
59
+ # for the H5Support directory at the same level as the EBSDLib directory
60
+ if ("${H5Support_SOURCE_DIR} " STREQUAL "" )
61
+ if (EXISTS "${EbsdLib_PARENT} /H5Support" )
62
+ set (H5Support_SOURCE_DIR "${EbsdLib_PARENT} /H5Support" )
63
+ elseif (EXISTS "${EbsdLib_SOURCE_DIR} /H5Support" )
64
+ set (H5Support_SOURCE_DIR "${EbsdLib_SOURCE_DIR} /H5Support" )
65
+ else ()
66
+ message (FATAL_ERROR "H5Support_SOURCE_DIR was not set. Where is the H5Support project directory. Please set the H5Support_SOURCE_DIR variable to the CMP directory." )
67
+ endif ()
68
+ message (STATUS "H5Support_SOURCE_DIR: ${H5Support_SOURCE_DIR} " )
76
69
endif ()
77
- message (STATUS "H5Support_SOURCE_DIR: ${H5Support_SOURCE_DIR} " )
78
- endif ()
79
- add_subdirectory ("${H5Support_SOURCE_DIR} " "${EbsdLibProj_BINARY_DIR} /H5Support" )
80
- else ()
81
- find_package (H5Support NAMES H5Support )
70
+ add_subdirectory ("${H5Support_SOURCE_DIR} " "${EbsdLibProj_BINARY_DIR} /H5Support" )
82
71
endif ()
72
+ else ()
73
+ find_package (H5Support REQUIRED )
74
+ endif ()
83
75
endif ()
84
76
mark_as_advanced (EbsdLib_ENABLE_HDF5 )
85
77
0 commit comments