summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-03-09 18:20:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-03-09 18:20:04 (GMT)
commit2a5d608f7bf5f99fb61898a331fde2ccc170117e (patch)
treeed1177d3d34ae5b5dfdc6c455678d675d6f12a5e /c++/src
parent53235aa24c7663a4ec0dd87bf75ae42a86caa79f (diff)
parent13f5388149a0dd39a6f67d30d63c6d622e249fd9 (diff)
downloadhdf5-2a5d608f7bf5f99fb61898a331fde2ccc170117e.zip
hdf5-2a5d608f7bf5f99fb61898a331fde2ccc170117e.tar.gz
hdf5-2a5d608f7bf5f99fb61898a331fde2ccc170117e.tar.bz2
Merge pull request #929 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '13f5388149a0dd39a6f67d30d63c6d622e249fd9': HDFFV-4359 Add HL C++ and fix install parameters HDFFV-4359 Add C,HL,CXX files
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/CMakeLists.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 921497f..350bdf7 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -139,3 +139,50 @@ if (HDF5_EXPORTED_TARGETS)
INCLUDES DESTINATION include
)
endif ()
+
+#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
+set (_PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
+if (BUILD_SHARED_LIBS)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
+endif ()
+
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}")
+
+configure_file (
+ ${HDF_RESOURCES_DIR}/libhdf5.pc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT cpplibraries
+)
+
+if (NOT WIN32)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5c++
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5c++
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT cpplibraries
+ )
+endif ()
+