support linking with system libunibreak
This commit is contained in:
parent
4569da4ad1
commit
94f3e588fc
|
@ -388,3 +388,9 @@ option('docs',
|
||||||
value: false,
|
value: false,
|
||||||
description: 'Enable building C of documentation (Requires doxygen)'
|
description: 'Enable building C of documentation (Requires doxygen)'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option('embedded-libunibreak',
|
||||||
|
type : 'boolean',
|
||||||
|
value : true,
|
||||||
|
description : 'Use the embedded in-tree libunibreak instead of the system libunibreak.'
|
||||||
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
if (get_option('embedded-libunibreak'))
|
||||||
libunibreak_src = [
|
libunibreak_src = [
|
||||||
'unibreakbase.h',
|
'unibreakbase.h',
|
||||||
'unibreakdef.h',
|
'unibreakdef.h',
|
||||||
'linebreak.h',
|
'linebreak.h',
|
||||||
|
@ -17,16 +17,19 @@ libunibreak_src = [
|
||||||
'graphemebreakdef.h',
|
'graphemebreakdef.h',
|
||||||
'emojidef.h',
|
'emojidef.h',
|
||||||
'emojidef.c',
|
'emojidef.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
libunibreak_lib = static_library('libunibreak',
|
libunibreak_lib = static_library('libunibreak',
|
||||||
libunibreak_src,
|
libunibreak_src,
|
||||||
include_directories : config_dir,
|
include_directories : config_dir,
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
libunibreak = declare_dependency(
|
libunibreak = declare_dependency(
|
||||||
include_directories: [include_directories('.')],
|
include_directories: [include_directories('.')],
|
||||||
link_with: libunibreak_lib,
|
link_with: libunibreak_lib,
|
||||||
dependencies: [eina],
|
dependencies: [eina],
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
libunibreak = dependency('libunibreak', version : '>=4.2')
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue