summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-08-11 13:52:25 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-08-11 13:52:25 (GMT)
commitc3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d (patch)
treee65a730fa7f989a58b04f957e6194fbed0912de0 /examples/CMakeLists.txt
parentdeccf66684b47acc62b65d53a084a32a48e99b61 (diff)
parent3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764 (diff)
downloadhdf5-c3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d.zip
hdf5-c3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d.tar.gz
hdf5-c3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d.tar.bz2
[svn-r27491] merge from trunk.
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 f0370cf..73d7702 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -39,18 +39,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)