cmake: make USER-H5MD.cmake consistent

This commit is contained in:
Christoph Junghans 2020-04-05 14:58:54 -06:00
parent 9aa6d04997
commit 1988a2a725
2 changed files with 7 additions and 7 deletions

View File

@ -490,7 +490,9 @@ if(PKG_USER-ATC)
target_compile_definitions(atc PRIVATE -DLAMMPS_${LAMMPS_SIZES})
endif()
include(Packages/USER-H5MD)
if(PKG_USER-H5MD)
include(Packages/USER-H5MD)
endif()
######################################################################
# packages which selectively include variants based on enabled styles

View File

@ -1,7 +1,5 @@
if(PKG_USER-H5MD)
enable_language(C)
enable_language(C)
find_package(HDF5 REQUIRED)
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})
endif()
find_package(HDF5 REQUIRED)
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})