Skip to content

How to extract defines from a header? #12558

Closed Answered by stsp
stsp asked this question in Q&A
Nov 27, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Thanks @dcbaker !
I've got your suggestion to work
and posted an answer on stackoverflow.

incdir = include_directories('some_inc_dir')
cpp = meson.get_compiler('c')
VAR = cpp.get_define('MY_DEFINE',
  include_directories: incdir,
  prefix: '#include "my_hdr.h"')

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dcbaker
Comment options

@stsp
Comment options

Answer selected by stsp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants