Skip to content

Commit b17ca4c

Browse files
committed
use vtkhdf5 module to link against hdf5 library
Change-Id: Idbb3efbbe6e4cf434b277ab4008b5cad2a115879 Signed-off-by: Mickael Philit <[email protected]>
1 parent 595cef6 commit b17ca4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Plugins/CGNSReader/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if (NOT CGNS_FOUND)
1010
message(FATAL_ERROR "Unable to locate CGNS library.")
1111
endif()
1212

13+
vtk_module_load(vtkhdf5)
1314
#
1415
include_directories(${CGNS_INCLUDE_DIR})
1516

@@ -78,12 +79,12 @@ else()
7879
SERVER_MANAGER_SOURCES ${SOURCES})
7980
endif()
8081

81-
set(CGNS_LINK_TO_HDF5 ON CACHE BOOL "use -lhdf5 for linking cgns to hdf5" )
82+
set(CGNS_LINK_TO_HDF5 ON CACHE BOOL "use vtkhdf5_LIBRARIES for linking cgns to hdf5" )
8283
mark_as_advanced(CGNS_LINK_TO_HDF5)
8384

8485
target_link_libraries(CGNSReader LINK_PRIVATE vtksys ${CGNS_LIBRARIES})
8586
if (CGNS_LINK_TO_HDF5)
86-
target_link_libraries(CGNSReader LINK_PRIVATE -lhdf5)
87+
target_link_libraries(CGNSReader LINK_PRIVATE ${vtkhdf5_LIBRARIES})
8788
endif()
8889

8990
# Add testing if necessary

0 commit comments

Comments
 (0)