summaryrefslogtreecommitdiffstats
path: root/CMakeInstallation.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-02-02 18:09:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-02-02 18:09:10 (GMT)
commit177c050891d979ec1197e68bf3ca7dd3148cb08b (patch)
treed4e1329e41af6f1c9d96fb10c03eefe48c619fc0 /CMakeInstallation.cmake
parentbe955c5e792ff642c259c25999a86c6007682019 (diff)
downloadhdf5-177c050891d979ec1197e68bf3ca7dd3148cb08b.zip
hdf5-177c050891d979ec1197e68bf3ca7dd3148cb08b.tar.gz
hdf5-177c050891d979ec1197e68bf3ca7dd3148cb08b.tar.bz2
HDFFV-9875 Fix target exports and add static tools pdb files
Diffstat (limited to 'CMakeInstallation.cmake')
-rw-r--r--CMakeInstallation.cmake36
1 files changed, 19 insertions, 17 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index fee9349..e1504bf 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -27,24 +27,26 @@ endif ()
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- install (
- EXPORT ${HDF5_EXPORTED_TARGETS}
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- NAMESPACE ${HDF5_PACKAGE}::
- COMPONENT configinstall
- )
-endif ()
+ if (HDF5_EXPORTED_TARGETS)
+ install (
+ EXPORT ${HDF5_EXPORTED_TARGETS}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF5_PACKAGE}::
+ COMPONENT configinstall
+ )
+ endif ()
-#-----------------------------------------------------------------------------
-# Export all exported targets to the build tree for use by parent project
-#-----------------------------------------------------------------------------
-if (NOT HDF5_EXTERNALLY_CONFIGURED)
- export (
- TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- NAMESPACE ${HDF5_PACKAGE}::
- )
+ #-----------------------------------------------------------------------------
+ # Export all exported targets to the build tree for use by parent project
+ #-----------------------------------------------------------------------------
+ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ export (
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF5_PACKAGE}::
+ )
+ endif ()
endif ()
#-----------------------------------------------------------------------------