Skip to content

Commit

Permalink
meson: provide CFLAGS and LDFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
takase1121 committed Dec 15, 2024
1 parent 153b8c5 commit 4895f27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/api/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,14 @@ static int f_get_debug_info(lua_State *L) {
lua_pushboolean(L, 0);
#endif
lua_setfield(L, -2, "renderer");
#ifdef LITE_BUILD_CARGS
lua_pushstring(L, LITE_BUILD_CARGS);
lua_setfield(L, -2, "CFLAGS");
#endif
#ifdef LITE_LINK_ARGS
lua_pushstring(L, LITE_LINK_ARGS);
lua_setfield(L, -2, "LDFLAGS");
#endif
return 1;
}

Expand Down
5 changes: 5 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ elif host_machine.system() == 'darwin'
endif

lite_includes += include_directories('.')
c_conf_data = configuration_data()
c_conf_data.set_quoted('cargs', ' '.join(lite_cargs).replace('"', '\''))
c_conf_data.set_quoted('link_args', ' '.join(lite_link_args).replace('"', '\''))
lite_cargs += '-DLITE_BUILD_CARGS=' + c_conf_data.get('cargs')
lite_cargs += '-DLITE_LINK_ARGS=' + c_conf_data.get('link_args')

executable('lite-xl',
lite_sources + lite_rc,
Expand Down

0 comments on commit 4895f27

Please sign in to comment.