From 5dac582cd4cb9d10d67cd194baba79fbd67b4b38 Mon Sep 17 00:00:00 2001 From: Christopher Albert Date: Wed, 25 Dec 2024 00:44:19 +0100 Subject: [PATCH] HDF5 tools corrections --- src/hdf5_tools/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hdf5_tools/CMakeLists.txt b/src/hdf5_tools/CMakeLists.txt index 19961a0..c87153a 100644 --- a/src/hdf5_tools/CMakeLists.txt +++ b/src/hdf5_tools/CMakeLists.txt @@ -45,9 +45,11 @@ add_library(hdf5_tools target_link_libraries(hdf5_tools PUBLIC ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}) if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU") - install (TARGETS hdf5_tools DESTINATION ${CMAKE_SOURCE_DIR}/lib) - install (DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION ${CMAKE_SOURCE_DIR}/include) + install (TARGETS hdf5_tools DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib) + install (DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include) elseif (CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - install (TARGETS hdf5_tools DESTINATION ${CMAKE_SOURCE_DIR}/ifort/lib) - install (DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION ${CMAKE_SOURCE_DIR}/ifort/include) + install (TARGETS hdf5_tools DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ifort/lib) + install (DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ifort/include) endif () + +add_library(LIBNEO::hdf5_tools ALIAS hdf5_tools)