summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-06-19 19:03:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-06-19 19:03:44 (GMT)
commitcc267767af89bf95807afc4e7b25d82638ef4892 (patch)
treee5ba7fa9167331eb0f9948e53fe97d8f6315e08d /fortran
parentb9ec6a6400a556b1250c249e158c4fffafccd550 (diff)
parent9397d67d91eb628b3b9096501cdab0a33335564c (diff)
downloadhdf5-cc267767af89bf95807afc4e7b25d82638ef4892.zip
hdf5-cc267767af89bf95807afc4e7b25d82638ef4892.tar.gz
hdf5-cc267767af89bf95807afc4e7b25d82638ef4892.tar.bz2
Merge pull request #1751 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '9397d67d91eb628b3b9096501cdab0a33335564c': HDFFV-10616 add h5fc script
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/CMakeLists.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 32c38ba..4e60361 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -453,3 +453,53 @@ 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_F90_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_F90_LIB_CORENAME}")
+endif ()
+if (BUILD_SHARED_LIBS)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_F90_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_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT fortlibraries
+)
+
+if (NOT WIN32)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5fc
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5fc
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT fortlibraries
+ )
+endif ()
+
+