forked from arch1t3cht/Aegisub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
c43e4fb
commit 84ac716
Showing
5 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
uchardet_sources = files([ | ||
'CharDistribution.cpp', | ||
'JpCntx.cpp', | ||
'LangModels/LangArabicModel.cpp', | ||
'LangModels/LangBulgarianModel.cpp', | ||
'LangModels/LangCroatianModel.cpp', | ||
'LangModels/LangCzechModel.cpp', | ||
'LangModels/LangEsperantoModel.cpp', | ||
'LangModels/LangEstonianModel.cpp', | ||
'LangModels/LangFinnishModel.cpp', | ||
'LangModels/LangFrenchModel.cpp', | ||
'LangModels/LangDanishModel.cpp', | ||
'LangModels/LangGermanModel.cpp', | ||
'LangModels/LangGreekModel.cpp', | ||
'LangModels/LangHungarianModel.cpp', | ||
'LangModels/LangHebrewModel.cpp', | ||
'LangModels/LangIrishModel.cpp', | ||
'LangModels/LangItalianModel.cpp', | ||
'LangModels/LangLithuanianModel.cpp', | ||
'LangModels/LangLatvianModel.cpp', | ||
'LangModels/LangMalteseModel.cpp', | ||
'LangModels/LangPolishModel.cpp', | ||
'LangModels/LangPortugueseModel.cpp', | ||
'LangModels/LangRomanianModel.cpp', | ||
'LangModels/LangRussianModel.cpp', | ||
'LangModels/LangSlovakModel.cpp', | ||
'LangModels/LangSloveneModel.cpp', | ||
'LangModels/LangSwedishModel.cpp', | ||
'LangModels/LangSpanishModel.cpp', | ||
'LangModels/LangThaiModel.cpp', | ||
'LangModels/LangTurkishModel.cpp', | ||
'LangModels/LangVietnameseModel.cpp', | ||
'nsHebrewProber.cpp', | ||
'nsCharSetProber.cpp', | ||
'nsBig5Prober.cpp', | ||
'nsEUCJPProber.cpp', | ||
'nsEUCKRProber.cpp', | ||
'nsEUCTWProber.cpp', | ||
'nsEscCharsetProber.cpp', | ||
'nsEscSM.cpp', | ||
'nsGB2312Prober.cpp', | ||
'nsMBCSGroupProber.cpp', | ||
'nsMBCSSM.cpp', | ||
'nsSBCSGroupProber.cpp', | ||
'nsSBCharSetProber.cpp', | ||
'nsSJISProber.cpp', | ||
'nsUTF8Prober.cpp', | ||
'nsLatin1Prober.cpp', | ||
'nsUniversalDetector.cpp', | ||
'uchardet.cpp', | ||
]) | ||
|
||
uchardet = library('uchardet', uchardet_sources) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[wrap-file] | ||
directory = uchardet-0.0.7 | ||
source_url = https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.7.tar.xz | ||
source_filename = uchardet-0.0.7.tar.gz | ||
source_hash = 3fc79408ae1d84b406922fa9319ce005631c95ca0f34b205fad867e8b30e45b1 | ||
patch_directory = uchardet | ||
|
||
[provides] | ||
uchardet = uchardet_dep |