Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: find podofo header on voidlinux #740

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project('horizon-eda', ['cpp', 'c'],
default_options: ['cpp_std=c++17', 'warning_level=1'],
)

fs = import('fs')
cxx = meson.get_compiler('cpp')
is_windows = target_machine.system() == 'windows'

Expand Down Expand Up @@ -66,14 +67,27 @@ if get_option('debug')
endif

# pkg-config is useless for podofo :(
podofo_lib =cxx.find_library('podofo', dirs: '/usr/lib/podofo-0.9/', required: false, has_headers:['/usr/include/podofo-0.9/podofo/podofo.h'] )
if fs.is_dir('/usr/include/podofo-0.9')
podofo_incdir = include_directories('/usr/include/podofo-0.9/', is_system: true)
elif fs.is_dir('/usr/local/include/podofo-0.9')
podofo_incdir = include_directories('/usr/local/include/podofo-0.9/', is_system: true)
else
podofo_incdir = include_directories()
endif

podofo_lib = cxx.find_library('podofo',
dirs: ['/usr/lib/podofo-0.9/', '/usr/local/lib/podofo-0.9/'],
required: false,
header_include_directories: podofo_incdir,
has_headers: 'podofo/podofo.h'
)
if podofo_lib.found()
podofo = declare_dependency (
podofo = declare_dependency (
dependencies: podofo_lib,
include_directories: include_directories('/usr/include/podofo-0.9')
)
include_directories: podofo_incdir
)
else
podofo = dependency('libpodofo09', required:false)
podofo = dependency('libpodofo09', required: false)
if podofo.found()
cpp_args += '-DINC_PODOFO_WITHOUT_DIRECTORY'
else
Expand Down Expand Up @@ -768,7 +782,6 @@ help_texts = custom_target(
command : [prog_python, '@INPUT@', '@OUTPUT@'],
)

fs = import('fs')
has_git_dir = fs.is_dir('.git')
if has_git_dir
message('including git commit')
Expand Down
Loading