summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/hdf5/files/0001-cross-compiling-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/hdf5/files/0001-cross-compiling-support.patch')
-rw-r--r--meta-oe/recipes-support/hdf5/files/0001-cross-compiling-support.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/hdf5/files/0001-cross-compiling-support.patch b/meta-oe/recipes-support/hdf5/files/0001-cross-compiling-support.patch
new file mode 100644
index 0000000000..97f16bbc0b
--- /dev/null
+++ b/meta-oe/recipes-support/hdf5/files/0001-cross-compiling-support.patch
@@ -0,0 +1,71 @@
1From 1b4fadf550587b46e405d7ccb777dcb00aa791a2 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 29 Jan 2019 15:39:15 +0800
4Subject: [PATCH 1/2] cross compiling support
5
6Do not generate config files at build time, use pre-generated
7files to instead.
8
9Upstream-Status: Inappropriate [oe specific]
10
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12---
13 CMakeLists.txt | 6 ++++++
14 src/CMakeLists.txt | 23 -----------------------
15 2 files changed, 6 insertions(+), 23 deletions(-)
16
17diff --git a/CMakeLists.txt b/CMakeLists.txt
18index 08a65c4..9af14d5 100644
19--- a/CMakeLists.txt
20+++ b/CMakeLists.txt
21@@ -817,4 +817,10 @@ endif ()
22 #-----------------------------------------------------------------------------
23 configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
24
25+#-----------------------------------------------------------------------------
26+# Copy the pre-generated files in place
27+#-----------------------------------------------------------------------------
28+configure_file(H5Tinit.c H5Tinit.c COPYONLY)
29+configure_file(H5lib_settings.c H5lib_settings.c COPYONLY)
30+
31 include (CMakeInstallation.cmake)
32diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
33index d343208..d11525b 100644
34--- a/src/CMakeLists.txt
35+++ b/src/CMakeLists.txt
36@@ -613,32 +613,9 @@ set (H5_PRIVATE_HEADERS
37 #-----------------------------------------------------------------------------
38 add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
39 TARGET_C_PROPERTIES (H5detect STATIC " " " ")
40-if (MSVC OR MINGW)
41- target_link_libraries (H5detect "ws2_32.lib")
42-endif ()
43-
44-set (CMD $<TARGET_FILE:H5detect>)
45-add_custom_command (
46- OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
47- COMMAND ${CMD}
48- ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c
49- DEPENDS H5detect
50-)
51
52 add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
53 TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
54-if (MSVC OR MINGW)
55- target_link_libraries (H5make_libsettings "ws2_32.lib")
56-endif ()
57-
58-set (CMD $<TARGET_FILE:H5make_libsettings>)
59-add_custom_command (
60- OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
61- COMMAND ${CMD}
62- ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
63- DEPENDS H5make_libsettings
64- WORKING_DIRECTORY ${HDF5_BINARY_DIR}
65-)
66
67 if (GENERATE_ERROR_HEADERS)
68 find_package (Perl)
69--
702.7.4
71