diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-03-08 22:39:35 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-03-08 22:39:35 (GMT) |
commit | 13f5388149a0dd39a6f67d30d63c6d622e249fd9 (patch) | |
tree | 71db7c6a75334fe676f4ea2cafef52210c5b1f94 /hl/c++ | |
parent | 3712738877a14c3257155acd1f558cfe039f3625 (diff) | |
download | hdf5-13f5388149a0dd39a6f67d30d63c6d622e249fd9.zip hdf5-13f5388149a0dd39a6f67d30d63c6d622e249fd9.tar.gz hdf5-13f5388149a0dd39a6f67d30d63c6d622e249fd9.tar.bz2 |
HDFFV-4359 Add HL C++ and fix install parameters
Diffstat (limited to 'hl/c++')
-rw-r--r-- | hl/c++/src/CMakeLists.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 0f187c5..28f860f 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -69,3 +69,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_HL_CPP_LIB_CORENAME}") +set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}") + +set (_PKG_CONFIG_LIBS_PRIVATE) + +set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}") +if (BUILD_SHARED_LIBS) + set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}") +endif () + +set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}") +set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}") + +configure_file ( + ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + @ONLY +) +install ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig + COMPONENT hlcpplibraries +) + +if (NOT WIN32) + set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER}) + configure_file ( + ${HDF_RESOURCES_DIR}/libh5cc.in + ${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++ + @ONLY + ) + install ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++ + DESTINATION ${HDF5_INSTALL_BIN_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + COMPONENT hlcpplibraries + ) +endif () + |