summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-08-27 17:06:54 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-08-27 17:06:54 (GMT)
commitc365b9a59fb706f1943edf851586bb6f67688368 (patch)
tree2fbe7d176f9a36bc689a05b11451e8a59daf239b /examples/CMakeLists.txt
parent3c5a088df0afced706a07c92df46494741a2c9ae (diff)
parenta9c28bac4e6822321c8a7a81784526201a2d6b09 (diff)
downloadhdf5-c365b9a59fb706f1943edf851586bb6f67688368.zip
hdf5-c365b9a59fb706f1943edf851586bb6f67688368.tar.gz
hdf5-c365b9a59fb706f1943edf851586bb6f67688368.tar.bz2
[svn-r27593] Merge revisions 27453 through 27592 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt22
1 files changed, 18 insertions, 4 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 7add410..8cabba6 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -46,18 +46,32 @@ set (examples
foreach (example ${examples})
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_NAMING (${example} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ")
+ TARGET_NAMING (${example} STATIC)
+ 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)
+ TARGET_C_PROPERTIES (${example}-shared SHARED " " " ")
+ target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET})
+ set_target_properties (${example}-shared PROPERTIES FOLDER examples)
+ endif (BUILD_SHARED_LIBS)
endforeach (example ${examples})
if (H5_HAVE_PARALLEL)
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
- TARGET_NAMING (ph5example ${LIB_TYPE})
- TARGET_C_PROPERTIES (ph5example ${LIB_TYPE} " " " ")
+ TARGET_NAMING (ph5example STATIC)
+ TARGET_C_PROPERTIES (ph5example STATIC " " " ")
target_link_libraries (ph5example ${HDF5_LIB_TARGET})
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)
+ TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ")
+ target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET})
+ set_target_properties (ph5example-shared PROPERTIES FOLDER examples)
+ endif (BUILD_SHARED_LIBS)
endif (H5_HAVE_PARALLEL)
if (BUILD_TESTING)