summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-04-29 08:04:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-04-29 08:04:21 (GMT)
commit01f196b31a03f072b685f998b0805c1f90322c2b (patch)
tree6e1cae004705ade1c870e4c6612a76b55be3c331 /examples/CMakeLists.txt
parentda4b69097756158fdbfcbf52b5b552e2034d263d (diff)
parentb3c5284692093953132c6c8227e0980b670bf4ad (diff)
downloadhdf5-01f196b31a03f072b685f998b0805c1f90322c2b.zip
hdf5-01f196b31a03f072b685f998b0805c1f90322c2b.tar.gz
hdf5-01f196b31a03f072b685f998b0805c1f90322c2b.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into merge_hyperslab_updates
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d8eb1a2..05646d8 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.2.2)
-PROJECT (HDF5_EXAMPLES)
+cmake_minimum_required (VERSION 3.10)
+project (HDF5_EXAMPLES C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@@ -46,13 +46,13 @@ set (examples
foreach (example ${examples})
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_NAMING (${example} STATIC)
+ set_property(TARGET ${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${example} STATIC " " " ")
target_link_libraries (${example} ${HDF5_LIB_TARGET})
set_target_properties (${example} PROPERTIES FOLDER examples)
if (BUILD_SHARED_LIBS)
add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_NAMING (${example}-shared SHARED)
+ set_property(TARGET ${example}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${example}-shared SHARED " " " ")
target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET})
set_target_properties (${example}-shared PROPERTIES FOLDER examples)
@@ -61,15 +61,15 @@ endforeach ()
if (H5_HAVE_PARALLEL)
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
- TARGET_NAMING (ph5example STATIC)
+ set_property(TARGET ph5example APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ph5example STATIC " " " ")
- target_link_libraries (ph5example ${HDF5_LIB_TARGET})
+ target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
set_target_properties (ph5example PROPERTIES FOLDER examples)
if (BUILD_SHARED_LIBS)
add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
- TARGET_NAMING (ph5example-shared SHARED)
+ set_property(TARGET ph5example-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ")
- target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET})
+ target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
set_target_properties (ph5example-shared PROPERTIES FOLDER examples)
endif ()
endif ()