Skip to content

Commit 310495e

Browse files
Pass CFLAGS, CXXFLAGS and LDFLAGS to meson through crossfile. Fixes compilation with Meson-0.51
1 parent 982650d commit 310495e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

3rdparty/EPMeson.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ function(ExternalProjectMeson EXTERNAL_PROJECT_NAME)
7474
# Note that if you have a single prefix with all your dependencies, you might find it easier to append to the environment variables C_INCLUDE_PATH with GCC/Clang and INCLUDE with MSVC to expand the default include path, and LIBRARY_PATH with GCC/Clang and LIB with MSVC to expand the default library search path.
7575
C_INCLUDE_PATH=${THIRDPARTY_PREFIX}/include
7676
INCLUDE=${THIRDPARTY_PREFIX}/include
77-
78-
CFLAGS=${MESON_CFLAGS}
79-
CXXFLAGS=${MESON_CXXFLAGS}
80-
LDFLAGS=${LDFLAGS}
8177
)
8278

8379
set(EPM_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${MESON_ENV}

3rdparty/meson_cross_file.txt.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ ranlib = '@CMAKE_RANLIB@'
1414

1515
[properties]
1616
needs_exe_wrapper = true
17+
c_args='@CFLAGS@'
18+
cpp_args='@CXXFLAGS@'
19+
c_link_args='@LDFLAGS@'
20+
cpp_link_args='@LDFLAGS@'
1721

1822
[host_machine]
1923
system = '@MESON_SYSTEM@'

0 commit comments

Comments
 (0)