Patrick Williams | 5877637 | 2022-04-13 09:07:35 -0500 | [diff] [blame^] | 1 | It sets 'libdir' with path element 'lib' directly which is not suitable for |
| 2 | multilib. Add an option '--baselib' for wx-config to support multilib when |
| 3 | cross compile. And set default value of baselib with "lib${wxPLATFORM_LIB_DIR}". |
| 4 | |
| 5 | Upstream-Status: Pending [oe specific] |
| 6 | |
| 7 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
| 8 | --- |
| 9 | build/cmake/config.cmake | 2 +- |
| 10 | wx-config.in | 6 ++++-- |
| 11 | 2 files changed, 5 insertions(+), 3 deletions(-) |
| 12 | |
| 13 | diff --git a/build/cmake/config.cmake b/build/cmake/config.cmake |
| 14 | index 52ae69d3f6..28aa733eb0 100644 |
| 15 | --- a/build/cmake/config.cmake |
| 16 | +++ b/build/cmake/config.cmake |
| 17 | @@ -86,7 +86,7 @@ function(wx_write_config) |
| 18 | set(prefix ${CMAKE_INSTALL_PREFIX}) |
| 19 | set(exec_prefix "\${prefix}") |
| 20 | set(includedir "\${prefix}/include") |
| 21 | - set(libdir "\${exec_prefix}/lib") |
| 22 | + set(libdir "\${exec_prefix}/\${baselib}") |
| 23 | set(bindir "\${exec_prefix}/bin") |
| 24 | |
| 25 | find_program(EGREP egrep) |
| 26 | diff --git a/wx-config.in b/wx-config.in |
| 27 | index e3f7d115bb..0e78af03c7 100755 |
| 28 | --- a/wx-config.in |
| 29 | +++ b/wx-config.in |
| 30 | @@ -42,7 +42,8 @@ usage() |
| 31 | { |
| 32 | cat 1>&2 <<EOF |
| 33 | |
| 34 | - wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--release] [--version-full] |
| 35 | + wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]][--baselib=DIR] |
| 36 | + [--release] [--version-full] |
| 37 | [--list] [--selected-config] [--host=HOST] [--toolkit=TOOLKIT] |
| 38 | [--universal[=yes|no]] [--unicode[=yes|no]] [--static[=yes|no]] |
| 39 | [--debug[=yes|no]] [--version[=VERSION]] [--flavour=FLAVOUR] |
| 40 | @@ -137,7 +138,7 @@ wxconfig_output_options="prefix exec_prefix |
| 41 | |
| 42 | # Options that permit the user to supply hints that may affect the output. |
| 43 | # These options all accept arbitrary values, to interpret as they please. |
| 44 | -wxconfig_input_options="prefix exec_prefix utility $wxconfig_schema" |
| 45 | +wxconfig_input_options="prefix exec_prefix baselib utility $wxconfig_schema" |
| 46 | |
| 47 | # Input options that accept only a yes or no argument. |
| 48 | # |
| 49 | @@ -404,6 +405,7 @@ is_cross() { [ "x@cross_compiling@" = "xyes" ]; } |
| 50 | # Determine the base directories we require. |
| 51 | prefix=${input_option_prefix-${this_prefix:-@prefix@}} |
| 52 | exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}} |
| 53 | +baselib=${input_option_baselib:-lib@wxPLATFORM_LIB_DIR@} |
| 54 | wxconfdir="@libdir@/wx/config" |
| 55 | |
| 56 | installed_configs=`cd "$wxconfdir" 2> /dev/null && ls | grep -v "^inplace-"` |