0001-cross-compiling-support.patch 2.3 KB

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