The same library among different OS #11514
-
The issue here: iniparser library. iniparser_dep = compiler.find_library('iniparser', has_headers: 'iniparser.h', required: false) But in Gentoo exact this library header for particular reasons is stored in /usr/include/iniparser4 iniparser_dep = compiler.find_library('iniparser4', has_headers: 'iniparser4/iniparser.h', required: false) And issue in Gentoo is ... due to source code does have : #include <iniparser.h> it doesn't compile...
I'm trying to do the second point and just redefine a little inlcude_directories... But I have stuck... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Your source code could In fact, you can also use ... Upstream iniparser has rejected numerous offers to improve the Makefile just to actually install the built library and headers, which is why the installation directory is totally unspecified. There's a pkg-config file but that isn't installed either and hardcodes /usr/lib. No one seems to actually install it anyway. |
Beta Was this translation helpful? Give feedback.
-
Hi @eli-schwartz , thank you ########################
# Checking for iniparser
########################
iniparser_dep = compiler.find_library('iniparser', has_headers: 'iniparser.h', required: false)
if not iniparser_dep.found()
iniparser4_dep = compiler.find_library('iniparser4', has_headers: 'iniparser4/iniparser.h', required: false)
iniparser_dep = declare_dependency(
include_directories: include_directories('/usr/include/iniparser4'),
dependencies: iniparser4_dep)
endif
if not iniparser_dep.found()
error('iniparser library is required!')
else
if not compiler.has_function('iniparser_load', dependencies: iniparser_dep)
error('iniparser library is required!')
endif
endif Actually meson is able to provide right header. Do you know is it possible in such case to avoid of hardcodes |
Beta Was this translation helpful? Give feedback.
Hi @eli-schwartz , thank you
Btw