mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLs
When searching for shared libraries on Windows, add H5_BUILT_AS_DYNAMIC_LIB to HDF5_DEFINITIONS so that the header file knows how to dllimport the symbols.
This commit is contained in:
committed by
Brad King
parent
6f131f49ee
commit
6848ff4ce5
@@ -733,6 +733,9 @@ if( NOT HDF5_FOUND )
|
|||||||
else()
|
else()
|
||||||
set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
|
set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
|
||||||
set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
|
set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND HDF5_DEFINITIONS "-DH5_BUILT_AS_DYNAMIC_LIB")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
find_library(HDF5_${LIB}_LIBRARY_DEBUG
|
find_library(HDF5_${LIB}_LIBRARY_DEBUG
|
||||||
NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
|
NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
|
||||||
@@ -794,6 +797,7 @@ if( NOT HDF5_FOUND )
|
|||||||
set(HDF5_HL_FOUND True)
|
set(HDF5_HL_FOUND True)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
_HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS)
|
||||||
_HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS)
|
_HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS)
|
||||||
_HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES)
|
_HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES)
|
||||||
_HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES)
|
_HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES)
|
||||||
|
|||||||
Reference in New Issue
Block a user