diff --git a/cmake/FindExodusII.cmake b/cmake/FindExodusII.cmake index 27e2c84..b28fd0b 100644 --- a/cmake/FindExodusII.cmake +++ b/cmake/FindExodusII.cmake @@ -48,6 +48,15 @@ find_package_handle_standard_args( VERSION_VAR EXODUSII_VERSION ) +if (EXODUSII_FOUND AND NOT TARGET exodusii::exodusii) + add_library(exodusii::exodusii UNKNOWN IMPORTED) + set_target_properties(exodusii::exodusii + PROPERTIES + IMPORTED_LOCATION "${EXODUSII_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${EXODUSII_INCLUDE_DIR}" + ) +endif() + mark_as_advanced(FORCE EXODUSII_INCLUDE_DIR EXODUSII_LIBRARY diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3f952a7..bec58d6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,7 +36,7 @@ target_link_libraries( PUBLIC fmt::fmt PRIVATE - ${EXODUSII_LIBRARY} + exodusii::exodusii ${NETCDF_LIBRARY} ${HDF5_LIBRARIES} )