diff options
Diffstat (limited to 'hl/fortran/test/CMakeLists.txt')
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index b186db2..a0ec30f 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -26,33 +26,33 @@ macro (ADD_H5_FORTRAN_EXE file) if(MSVC) set_property(TARGET hl_f90_${file} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() - if (NOT BUILD_SHARED_LIBS) + if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) target_include_directories (hl_f90_${file} PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" ) target_link_libraries (hl_f90_${file} PRIVATE - ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} + ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ) set_target_properties (hl_f90_${file} PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - elseif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + else () target_include_directories (hl_f90_${file} PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src" ) target_link_libraries (hl_f90_${file} PRIVATE - ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} + ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ) set_target_properties (hl_f90_${file} PROPERTIES LINKER_LANGUAGE Fortran FOLDER test/hl/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) endif () endmacro () |