diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-10-02 21:16:34 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-10-02 21:17:10 (GMT) |
commit | 8c26358eca11455235df239a7e9f3a225b3141da (patch) | |
tree | f9ae4061b519ae7c516830a59a92faba93f9f006 /tools/h5stat/CMakeLists.txt | |
parent | 66ef37d0d8030f38c924374facc49f6af6f6ddd5 (diff) | |
download | hdf5-8c26358eca11455235df239a7e9f3a225b3141da.zip hdf5-8c26358eca11455235df239a7e9f3a225b3141da.tar.gz hdf5-8c26358eca11455235df239a7e9f3a225b3141da.tar.bz2 |
Merge CMake changes from 1.10 to 1.8
Diffstat (limited to 'tools/h5stat/CMakeLists.txt')
-rw-r--r-- | tools/h5stat/CMakeLists.txt | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 6e601d9..146b11a 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -1,17 +1,13 @@ cmake_minimum_required (VERSION 3.10) -PROJECT (HDF5_TOOLS_H5STAT) - -#----------------------------------------------------------------------------- -# Setup include Directories -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) +project (HDF5_TOOLS_H5STAT C) # -------------------------------------------------------------------- # Add the h5stat executables # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) -TARGET_C_PROPERTIES (h5stat STATIC " " " ") -target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_include_directories(h5stat PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (h5stat STATIC) +target_link_libraries (h5stat PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat") @@ -19,8 +15,9 @@ set (H5_DEP_EXECUTABLES h5stat) if (BUILD_SHARED_LIBS) add_executable (h5stat-shared ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) - TARGET_C_PROPERTIES (h5stat-shared SHARED " " " ") - target_link_libraries (h5stat-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + target_include_directories(h5stat-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5stat-shared SHARED) + target_link_libraries (h5stat-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (h5stat-shared PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat-shared") @@ -33,8 +30,9 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS) add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c) - TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") - target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) + target_include_directories(h5stat_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (h5stat_gentest STATIC) + target_link_libraries (h5stat_gentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>) |