build: fix macos build

Summary:
it the .pc file of luajit carries linker flags that causes compilation
fails on macos, thus we need to split up the .pc file into our own
dependency, and use it with causion

Reviewers: zmike, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7995
This commit is contained in:
Marcel Hollerbach 2019-02-22 08:53:19 -05:00 committed by Mike Blumenkrantz
parent 11e80c7327
commit a6d256cb6a
2 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,6 @@
executable('elua',
'main.c',
dependencies: [eina, ecore, elua, intl],
link_args : bin_linker_args,
install: true,
)

View File

@ -1,5 +1,16 @@
elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
elua_pub_deps = [dependency('luajit')]
if sys_osx == true
# luajit on macro is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
luajit = dependency('luajit')
lua = declare_dependency(
include_directories: include_directories(luajit.get_pkgconfig_variable('includedir')),
link_args: ['-L'+luajit.get_pkgconfig_variable('libdir'), '-l'+luajit.get_pkgconfig_variable('libname')]
)
elua_pub_deps = [lua]
else
elua_pub_deps = [dependency('luajit')]
endif
elua_src = ['elua.c', 'io.c', 'cache.c']
elua_header_src = ['Elua.h']