summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-08-05 21:01:07 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-08-05 21:01:07 (GMT)
commit9e2434625dde11a19b46a5154477247266792219 (patch)
tree7e7b94935a7acdf8024ec464218c564dccf52963 /hl/c++
parent0b4b73331d2cd4d6d3433e8bc5c45011f75d6fd3 (diff)
downloadhdf5-9e2434625dde11a19b46a5154477247266792219.zip
hdf5-9e2434625dde11a19b46a5154477247266792219.tar.gz
hdf5-9e2434625dde11a19b46a5154477247266792219.tar.bz2
[svn-r27469] Merge from trunk with dual-binary CMake code.
Tested: local linux with CMake
Diffstat (limited to 'hl/c++')
-rw-r--r--hl/c++/Makefile.in5
-rw-r--r--hl/c++/examples/CMakeLists.txt4
-rw-r--r--hl/c++/examples/Makefile.in5
-rw-r--r--hl/c++/src/CMakeLists.txt34
-rw-r--r--hl/c++/src/Makefile.in5
-rw-r--r--hl/c++/test/CMakeLists.txt4
-rw-r--r--hl/c++/test/Makefile.in5
7 files changed, 47 insertions, 15 deletions
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 831dadc..6005ec4 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -102,7 +102,10 @@ TESTS =
subdir = hl/c++
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index e3fc3ae..77a50bf 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -11,8 +11,8 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
-TARGET_NAMING (ptExampleFL ${LIB_TYPE})
-TARGET_C_PROPERTIES (ptExampleFL ${LIB_TYPE} " " " ")
+TARGET_NAMING (ptExampleFL STATIC)
+TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ")
target_link_libraries (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index 67a14ca..03454de 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -107,7 +107,10 @@ TESTS =
subdir = hl/c++/examples
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index b511260..e37c5ba 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -10,22 +10,42 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR})
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)
-add_library (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS})
-TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} " " " ")
+add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SRCS})
+TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ")
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})
+H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC)
set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES
FOLDER libraries/hl
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+set (install_targets ${HDF5_HL_CPP_LIB_TARGET})
+
+if (BUILD_SHARED_LIBS)
+ add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SRCS})
+ TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ")
+ target_link_libraries (
+ ${HDF5_HL_CPP_LIBSH_TARGET}
+ ${HDF5_HL_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
+ )
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED)
+ set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES
+ FOLDER libraries/hl
+ COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
+ )
+ set (install_targets ${install_targets} ${HDF5_HL_CPP_LIBSH_TARGET})
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
-# Add file(s) to CMake Install
+# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
FILES
@@ -41,12 +61,12 @@ install (
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
+ INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlcpplibraries)
endif (BUILD_SHARED_LIBS)
-
+
install (
TARGETS
- ${HDF5_HL_CPP_LIB_TARGET}
+ ${install_targets}
EXPORT
${HDF5_EXPORTED_TARGETS}
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 05c8fd8..c5fe977 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -106,7 +106,10 @@ TESTS =
subdir = hl/c++/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index ff06b22..de5b363 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -16,8 +16,8 @@ INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
-TARGET_C_PROPERTIES (hl_ptableTest ${LIB_TYPE} " " " ")
-TARGET_NAMING (hl_ptableTest ${LIB_TYPE})
+TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ")
+TARGET_NAMING (hl_ptableTest STATIC)
target_link_libraries (
hl_ptableTest
${HDF5_LIB_TARGET}
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 4f88242..948d735 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -103,7 +103,10 @@ TESTS = $(am__EXEEXT_1)
subdir = hl/c++/test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs