diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-03-09 22:57:54 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-03-09 22:57:54 (GMT) |
commit | a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d (patch) | |
tree | ab4a705acd06c1df3aa6f54652804ce5ddb7e4f2 /c++/src | |
parent | 3093cb5bbac5d91d16787f998346dc0270322597 (diff) | |
parent | 2a5d608f7bf5f99fb61898a331fde2ccc170117e (diff) | |
download | hdf5-a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d.zip hdf5-a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d.tar.gz hdf5-a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d.tar.bz2 |
Merge branch 'develop' into hdf5_1_10_merge
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/CMakeLists.txt | 47 |
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 () + |