diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-05-12 18:51:33 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-05-12 18:51:33 (GMT) |
commit | 84103cef854a758a8d5dcd270ba36e2495ed3282 (patch) | |
tree | f11548eec782a94edda60d2f78edb7f320d8b4c2 /hl/c++/src/CMakeLists.txt | |
parent | 08ce72aebd7b8957a11c365f95b4bbded708e91f (diff) | |
download | hdf5-84103cef854a758a8d5dcd270ba36e2495ed3282.zip hdf5-84103cef854a758a8d5dcd270ba36e2495ed3282.tar.gz hdf5-84103cef854a758a8d5dcd270ba36e2495ed3282.tar.bz2 |
[svn-r18773] Add files to support building library with CMake
Tested: Local linux
Diffstat (limited to 'hl/c++/src/CMakeLists.txt')
-rw-r--r-- | hl/c++/src/CMakeLists.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt new file mode 100644 index 0000000..889b716 --- /dev/null +++ b/hl/c++/src/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required (VERSION 2.8) +PROJECT (HDF5_HL_CPP_SRC) + +#----------------------------------------------------------------------------- +# Define Sources +#----------------------------------------------------------------------------- +SET (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp) +SET (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h) +INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR}) + +ADD_LIBRARY ( ${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS}) +TARGET_LINK_LIBRARIES ( + ${HDF5_HL_CPP_LIB_TARGET} + ${HDF5_HL_LIB_TARGET} + ${HDF5_LIB_TARGET} +) +SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}") +H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} ${LIB_TYPE}) + +#----------------------------------------------------------------------------- +# Add file(s) to CMake Install +#----------------------------------------------------------------------------- +INSTALL ( + FILES + ${HDF5_HL_CPP_HDRS} + DESTINATION + include/hl/cpp +) + +#----------------------------------------------------------------------------- +# Add Target(s) to CMake Install for import into other projects +#----------------------------------------------------------------------------- +IF (HDF5_EXPORTED_TARGETS) + INSTALL ( + TARGETS + ${HDF5_HL_CPP_LIB_TARGET} + EXPORT + ${HDF5_EXPORTED_TARGETS} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + ) +ENDIF (HDF5_EXPORTED_TARGETS) |