summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
Diffstat (limited to 'hl')
-rw-r--r--hl/c++/examples/CMakeLists.txt7
-rw-r--r--hl/c++/src/CMakeLists.txt29
-rw-r--r--hl/c++/test/CMakeLists.txt7
-rw-r--r--hl/examples/CMakeLists.txt6
-rw-r--r--hl/fortran/examples/CMakeLists.txt9
-rw-r--r--hl/fortran/src/CMakeLists.txt95
-rw-r--r--hl/fortran/test/CMakeLists.txt56
-rw-r--r--hl/src/CMakeLists.txt29
-rw-r--r--hl/test/CMakeLists.txt30
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt18
-rw-r--r--hl/tools/h5watch/CMakeLists.txt24
11 files changed, 145 insertions, 165 deletions
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 1760d71..e66aa81 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -5,10 +5,9 @@ project (HDF5_HL_CPP_EXAMPLES CXX)
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
-set_property(TARGET ptExampleFL APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ")
-target_link_libraries (
- ptExampleFL
+target_include_directories(ptExampleFL PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (ptExampleFL STATIC)
+target_link_libraries (ptExampleFL PRIVATE
${HDF5_HL_CPP_LIB_TARGET}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 10a0c1e..8e6de0c 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -9,30 +9,31 @@ set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES})
-set_property(TARGET ${HDF5_HL_CPP_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ")
+target_include_directories(${HDF5_HL_CPP_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
+set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl)
set (install_targets ${HDF5_HL_CPP_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES})
- set_property(TARGET ${HDF5_HL_CPP_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ")
+ target_include_directories(${HDF5_HL_CPP_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_definitions(${HDF5_HL_CPP_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ )
+ TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED "HL_CXX")
- set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES
- FOLDER libraries/hl
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
- )
+ set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl)
set (install_targets ${install_targets} ${HDF5_HL_CPP_LIBSH_TARGET})
endif ()
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 710e218..3b5384a 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -2,10 +2,9 @@ cmake_minimum_required (VERSION 3.10)
project (HDF5_HL_CPP_TEST CXX)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
-set_property(TARGET hl_ptableTest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ")
-target_link_libraries (
- hl_ptableTest
+target_include_directories(hl_ptableTest PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (hl_ptableTest STATIC)
+target_link_libraries (hl_ptableTest PRIVATE
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
${HDF5_CPP_LIB_TARGET}
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 79250e6..2f9019d 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -28,9 +28,9 @@ set (examples
foreach (example ${examples})
add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
- set_property(TARGET hl_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ")
- target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories(hl_ex_${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_ex_${example} STATIC)
+ target_link_libraries (hl_ex_${example} PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)
endforeach ()
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index af92efc..db047d0 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -8,14 +8,15 @@ set (examples
foreach (example ${examples})
add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ")
- target_link_libraries (hl_f90_ex_${example}
+ target_include_directories (hl_f90_ex_${example} PRIVATE
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src"
+ )
+ TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC)
+ target_link_libraries (hl_f90_ex_${example} PRIVATE
${HDF5_HL_F90_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
- set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 41adb6e..6e808c3 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -15,21 +15,13 @@ endif ()
# Generate the H5LT and H5TB REAL APIs
#-----------------------------------------------------------------------------
-add_executable (H5HL_buildiface
- ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90
- )
+add_executable (H5HL_buildiface ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 )
target_include_directories(H5HL_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
if (WIN32 AND MSVC)
if (BUILD_SHARED_LIBS)
- set_target_properties (H5HL_buildiface
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
+ set_target_properties (H5HL_buildiface PROPERTIES COMPILE_FLAGS "/MT")
endif ()
- set_target_properties (H5HL_buildiface
- PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
+ set_target_properties (H5HL_buildiface PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
endif ()
set_target_properties (H5HL_buildiface PROPERTIES
LINKER_LANGUAGE Fortran
@@ -58,33 +50,36 @@ set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C)
set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
-target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC "${HDF5_F90_BINARY_DIR}/static")
-set_property(TARGET ${HDF5_HL_F90_C_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ")
+target_include_directories(${HDF5_HL_F90_C_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE C
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
- target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC "${HDF5_F90_BINARY_DIR}/shared")
- set_property(TARGET ${HDF5_HL_F90_C_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
+ target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_definitions(${HDF5_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ )
+ TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED "HL_F")
set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE C
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET})
endif ()
@@ -153,58 +148,50 @@ if (BUILD_SHARED_LIBS)
endif ()
add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SOURCES})
-TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC "${CMAKE_Fortran_MODULE_DIRECTORY}/static")
-if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
-endif ()
-set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR}")
+target_include_directories (${HDF5_HL_F90_LIB_TARGET}
+ PRIVATE "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+target_compile_definitions(${HDF5_LIBSH_TARGET}
+ PUBLIC $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"HDF5F90_WINDOWS">
+)
+TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC)
+target_link_libraries (${HDF5_HL_F90_LIB_TARGET}
+ PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}
+)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE Fortran
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (WIN32)
- set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
- )
-endif ()
set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
add_dependencies(${HDF5_HL_F90_LIB_TARGET} H5HLgen)
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SOURCES_SHARED})
- set (SHARED_LINK_FLAGS " ")
- if (WIN32 AND MSVC)
- set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def")
- endif ()
- TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
- target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS})
- target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC "${CMAKE_Fortran_MODULE_DIRECTORY}/shared")
- set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR}")
- if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
- endif ()
+ target_include_directories (${HDF5_HL_F90_LIBSH_TARGET}
+ PRIVATE "${HDF5_F90_BINARY_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_definitions(${HDF5_LIBSH_TARGET}
+ PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS">
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ )
+ TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED)
+ target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET}
+ PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET}
+ PRIVATE ${LINK_Fortran_LIBS}
+ INTERFACE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def">
+ )
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED "HL_F")
set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE Fortran
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32)
- set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS"
- )
- endif ()
set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET})
add_dependencies(${HDF5_HL_F90_LIBSH_TARGET} H5HLgenSH)
endif ()
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index e82bb2b..d5aac56 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -7,18 +7,16 @@ project (HDF5_HL_FORTRAN_TESTS C Fortran)
#-- Adding test for hl_f90_tstds
add_executable (hl_f90_tstds tstds.F90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ")
-target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_property(TARGET hl_f90_tstds APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+target_include_directories (hl_f90_tstds PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC)
+target_link_libraries (hl_f90_tstds PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tstds-shared tstds.F90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ")
- target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
- target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_property(TARGET hl_f90_tstds-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_include_directories (hl_f90_tstds-shared PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED)
+ target_link_libraries (hl_f90_tstds-shared PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
set_target_properties (hl_f90_tstds-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
@@ -28,18 +26,16 @@ endif ()
#-- Adding test for hl_f90_tstlite
add_executable (hl_f90_tstlite tstlite.F90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ")
-target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
-target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_property(TARGET hl_f90_tstlite APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+target_include_directories (hl_f90_tstlite PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC)
+target_link_libraries (hl_f90_tstlite PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tstlite-shared tstlite.F90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ")
- target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
- target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_property(TARGET hl_f90_tstlite-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_include_directories (hl_f90_tstlite-shared PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED)
+ target_link_libraries (hl_f90_tstlite-shared PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
set_target_properties (hl_f90_tstlite-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
@@ -49,18 +45,16 @@ endif ()
#-- Adding test for hl_f90_tstimage
add_executable (hl_f90_tstimage tstimage.F90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ")
-target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_property(TARGET hl_f90_tstimage APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+target_include_directories (hl_f90_tstimage PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC)
+target_link_libraries (hl_f90_tstimage PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tstimage-shared tstimage.F90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ")
- target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
- target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_property(TARGET hl_f90_tstimage-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_include_directories (hl_f90_tstimage-shared PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED)
+ target_link_libraries (hl_f90_tstimage-shared PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
set_target_properties (hl_f90_tstimage-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
@@ -70,18 +64,16 @@ endif ()
#-- Adding test for hl_f90_tsttable
add_executable (hl_f90_tsttable tsttable.F90)
-TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ")
-target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
-target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
-set_property(TARGET hl_f90_tsttable APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+target_include_directories (hl_f90_tsttable PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC)
+target_link_libraries (hl_f90_tsttable PRIVATE ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tsttable-shared tsttable.F90)
- TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ")
- target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
- target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- set_property(TARGET hl_f90_tsttable-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ target_include_directories (hl_f90_tsttable-shared PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
+ TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED)
+ target_link_libraries (hl_f90_tsttable-shared PRIVATE ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
set_target_properties (hl_f90_tsttable-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index bec40ec..aa33e59 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -30,29 +30,30 @@ set (HL_HEADERS
)
add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
-set_property(TARGET ${HDF5_HL_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
+target_include_directories(${HDF5_HL_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
+set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
set (install_targets ${HDF5_HL_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS})
- set_property(TARGET ${HDF5_HL_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ")
+ target_include_directories(${HDF5_HL_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_definitions(${HDF5_HL_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ )
+ TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED "HL")
- set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES
- FOLDER libraries/hl
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
- )
+ set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES FOLDER libraries/hl)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIBSH_TARGET}")
set (install_targets ${install_targets} ${HDF5_HL_LIBSH_TARGET})
endif ()
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 0acb2f4..7911d1b 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -19,9 +19,9 @@ configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ON
# --------------------------------------------------------------------
MACRO (HL_ADD_EXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
- set_property(TARGET hl_${hl_name} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ")
- target_link_libraries (hl_${hl_name}
+ target_include_directories(hl_${hl_name} PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_${hl_name} STATIC)
+ target_link_libraries (hl_${hl_name} PRIVATE
${HDF5_HL_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -31,9 +31,9 @@ ENDMACRO ()
MACRO (HL_ADD_SHEXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
- set_property(TARGET hl_${hl_name} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ")
- target_link_libraries (hl_${hl_name}
+ target_include_directories(hl_${hl_name} PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_${hl_name} SHARED)
+ target_link_libraries (hl_${hl_name} PRIVATE
${HDF5_HL_LIBSH_TARGET}
${HDF5_TEST_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -52,9 +52,9 @@ HL_ADD_EXE (test_dset_append)
# test_packet has two source files
add_executable (hl_test_packet test_packet.c test_packet_vlen.c)
-set_property(TARGET hl_test_packet APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ")
-target_link_libraries (hl_test_packet
+target_include_directories(hl_test_packet PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (hl_test_packet STATIC)
+target_link_libraries (hl_test_packet PRIVATE
${HDF5_HL_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -67,9 +67,9 @@ set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_gen_test_ds gen_test_ds.c)
- set_property(TARGET hl_gen_test_ds APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ")
- target_link_libraries (hl_gen_test_ds
+ target_include_directories(hl_gen_test_ds PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_gen_test_ds STATIC)
+ target_link_libraries (hl_gen_test_ds PRIVATE
${HDF5_HL_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -77,9 +77,9 @@ if (HDF5_BUILD_GENERATORS)
set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
add_executable (hl_gen_test_ld gen_test_ld.c)
- set_property(TARGET hl_gen_test_ld APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_gen_test_ld STATIC " " " ")
- target_link_libraries (hl_gen_test_ld
+ target_include_directories(hl_gen_test_ld PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_gen_test_ld STATIC)
+ target_link_libraries (hl_gen_test_ld PRIVATE
${HDF5_HL_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 977d78c..1d0e87c 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -15,9 +15,9 @@ set (GIF2H5_SOURCES
#-- Add gif2hdf5 program
add_executable (gif2h5 ${GIF2H5_SOURCES})
-set_property(TARGET gif2h5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (gif2h5 STATIC " " " ")
-target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(gif2h5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (gif2h5 STATIC)
+target_link_libraries (gif2h5 PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};gif2h5")
@@ -27,9 +27,9 @@ set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
)
add_executable (h52gif ${hdf2gif_SOURCES})
-set_property(TARGET h52gif APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h52gif STATIC " " " ")
-target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(h52gif PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h52gif STATIC)
+target_link_libraries (h52gif PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h52gif")
@@ -41,9 +41,9 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
- set_property(TARGET hl_h52gifgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ")
- target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories(hl_h52gifgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_h52gifgentest STATIC)
+ target_link_libraries (hl_h52gifgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index b3bd856..8ab1e41 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -10,9 +10,9 @@ set (H5WATCH_SOURCES
#-- Add h5watch program
add_executable (h5watch ${H5WATCH_SOURCES})
-set_property(TARGET h5watch APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (h5watch STATIC " " " ")
-target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+target_include_directories(h5watch PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (h5watch STATIC)
+target_link_libraries (h5watch PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5watch PROPERTIES FOLDER tools/hl)
if (BUILD_TESTING)
@@ -21,9 +21,9 @@ if (BUILD_TESTING)
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c
)
add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES})
- set_property(TARGET hl_swmr_check_compat_vfd APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ")
- target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_LIB_TARGET})
+ target_include_directories(hl_swmr_check_compat_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC)
+ target_link_libraries (hl_swmr_check_compat_vfd PRIVATE ${HDF5_LIB_TARGET})
set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
#-- Add extend_dset program
@@ -31,15 +31,15 @@ if (BUILD_TESTING)
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
)
add_executable (extend_dset ${extend_dset_SOURCES})
- set_property(TARGET extend_dset APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (extend_dset STATIC " " " ")
- target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ target_include_directories(extend_dset PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (extend_dset STATIC)
+ target_link_libraries (extend_dset PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (extend_dset PROPERTIES FOLDER tools/hl)
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
- set_property(TARGET h5watchgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ")
- target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_include_directories(h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (h5watchgentest STATIC)
+ target_link_libraries (h5watchgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl)
include (CMakeTests.cmake)