forked from mia/Aegisub
84ac716972
Meson port instead of using CMake as I ran into issues with the src directory (where uchardet.h is located) not being appended to the include path, and on Windows I ran into a Meson issue where a -D macro definition was being interpreted as a filename. In the end a Meson port seemed simpler than working out the CMake issues, as the CMakeLists.txt files were straightforward and easy to port. Note that because of the directory structure of the uchardet source I had to change the include directive from uchardet/uchardet.h to just uchardet.h. This is actually more in line with the uchardet pkg-config file, which appends /usr/include/uchardet to the include path.
16 lines
512 B
Meson
16 lines
512 B
Meson
project('uchardet', 'cpp', version: '0.0.7', meson_version: '>=0.57.0')
|
|
|
|
inc = include_directories('src')
|
|
|
|
cpp = meson.get_compiler('cpp')
|
|
|
|
if cpp.has_argument('-msse2') and cpp.has_argument('-mfpmath=sse')
|
|
add_project_arguments('-msse2', '-mfpmath=sse', language: 'cpp')
|
|
elif cpp.has_argument('-ffloat-store')
|
|
add_project_arguments('-ffloat-store', language: 'cpp')
|
|
endif
|
|
|
|
subdir('src')
|
|
|
|
uchardet_dep = declare_dependency(link_with: uchardet,
|
|
include_directories: inc)
|