mirror of https://github.com/odrling/Aegisub
fix mingw build
This commit is contained in:
parent
10f8114df3
commit
82afc56f6f
|
@ -39,6 +39,12 @@ std::string ErrorString(int error) {
|
|||
return str;
|
||||
}
|
||||
|
||||
#ifdef __MINGW32__
|
||||
|
||||
void SetThreadName(LPCSTR szThreadName) {}
|
||||
|
||||
#else
|
||||
|
||||
#define MS_VC_EXCEPTION 0x406d1388
|
||||
|
||||
/// Parameters for setting the thread name
|
||||
|
@ -60,6 +66,7 @@ void SetThreadName(LPCSTR szThreadName) {
|
|||
}
|
||||
__except (EXCEPTION_CONTINUE_EXECUTION) {}
|
||||
}
|
||||
#endif
|
||||
|
||||
void sleep_for(int ms) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(ms));
|
||||
|
|
20
meson.build
20
meson.build
|
@ -1,7 +1,7 @@
|
|||
project('Aegisub', ['c', 'cpp'],
|
||||
license: 'BSD-3-Clause',
|
||||
meson_version: '>=0.55.0',
|
||||
default_options: ['cpp_std=c++11', 'b_lto=true', 'buildtype=debugoptimized'],
|
||||
default_options: ['cpp_std=c++11', 'buildtype=debugoptimized'],
|
||||
version: '3.3.3')
|
||||
|
||||
cmake = import('cmake')
|
||||
|
@ -14,7 +14,7 @@ if host_machine.system() == 'windows'
|
|||
endif
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
if host_machine.system() == 'windows'
|
||||
version_sh = find_program('tools/version.ps1')
|
||||
else
|
||||
version_sh = find_program('tools/version.sh')
|
||||
|
@ -68,15 +68,27 @@ elif host_machine.system() != 'windows'
|
|||
deps += dependency('fontconfig')
|
||||
endif
|
||||
|
||||
|
||||
cxx = meson.get_compiler('cpp')
|
||||
cc = meson.get_compiler('c')
|
||||
deps += cc.find_library('m', required: false)
|
||||
deps += cc.find_library('dl', required: false)
|
||||
|
||||
if not cxx.check_header('iconv.h')
|
||||
iconv_sp = subproject('iconv') # this really needs to be replaced with a proper port
|
||||
deps += iconv_sp.get_variable('libiconv_dep')
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
deps += cc.find_library('ws2_32', required: true)
|
||||
deps += cc.find_library('bcrypt', required: true)
|
||||
deps += cc.find_library('iconv', required: true)
|
||||
endif
|
||||
|
||||
if not (host_machine.system() == 'windows' and cc.get_id() == 'gcc')
|
||||
add_project_arguments('-Db_lto=true', language: 'cpp') # lto breaks build for mingw
|
||||
endif
|
||||
|
||||
deps += dependency('libass', version: '>=0.9.7',
|
||||
fallback: ['libass', 'libass_dep'])
|
||||
|
||||
|
@ -153,6 +165,10 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
# maybe mingw needs this
|
||||
conf.set('UNICODE', '1')
|
||||
conf.set('_UNICODE', '1')
|
||||
|
||||
deps += dependency('icu-uc', version: '>=4.8.1.1')
|
||||
deps += dependency('icu-i18n', version: '>=4.8.1.1')
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
#define MAXCLUSTER (64*1048576)
|
||||
#define MAXFRAME (4*1048576)
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
#define LL(x) x##i64
|
||||
#define ULL(x) x##ui64
|
||||
#else
|
||||
|
|
|
@ -68,6 +68,7 @@ if ($exactGitTag -match $semVerMatch) {
|
|||
|
||||
$version['BUILD_GIT_VERSION_NUMBER'] = $gitRevision
|
||||
$version['BUILD_GIT_VERSION_STRING'] = $gitVersionString
|
||||
$version['RELEASE_VERSION'] = $gitVersionString
|
||||
|
||||
$version.GetEnumerator() | %{
|
||||
$type = $_.Value.GetType()
|
||||
|
@ -91,10 +92,12 @@ $gitVersionXml = [xml]@'
|
|||
<PropertyGroup>
|
||||
<GitVersionNumber></GitVersionNumber>
|
||||
<GitVersionString></GitVersionString>
|
||||
<ReleaseVersion></ReleaseVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
'@
|
||||
|
||||
$gitVersionXml.Project.PropertyGroup.GitVersionNumber = $gitRevision.ToString()
|
||||
$gitVersionXml.Project.PropertyGroup.GitVersionString = $gitVersionString
|
||||
$gitVersionXml.Project.PropertyGroup.ReleaseVersion = $gitVersionString
|
||||
$gitVersionXml.Save($gitVersionXmlPath)
|
||||
|
|
Loading…
Reference in New Issue