mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
build/windows: More self_build organization to support MINGW32
This commit is contained in:
@@ -105,14 +105,13 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
|
||||
if (Test-Path meson.build -Type Leaf)
|
||||
{
|
||||
#babl and GEGL already auto install .pdb but we don't know about other eventual deps
|
||||
if ("$dep" -ne 'babl' -and "$dep" -ne 'gegl')
|
||||
{
|
||||
Add-Content meson.build "meson.add_install_script(find_program('$("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py'))"
|
||||
}
|
||||
if ("$env:MSYSTEM_PREFIX" -ne 'MINGW32')
|
||||
{
|
||||
if ("$dep" -ne 'babl' -and "$dep" -ne 'gegl')
|
||||
{
|
||||
Add-Content meson.build "meson.add_install_script(find_program('$("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py'))"
|
||||
}
|
||||
$clang_opts_meson=@('-Dc_args=-"fansi-escape-codes -gcodeview"', '-Dcpp_args=-"fansi-escape-codes -gcodeview"', '-Dc_link_args="-Wl,--pdb="', '-Dcpp_link_args="-Wl,--pdb="')
|
||||
$clang_opts_cmake=@('-DCMAKE_C_FLAGS="-gcodeview"', '-DCMAKE_CXX_FLAGS="-gcodeview"', '-DCMAKE_EXE_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--pdb="')
|
||||
}
|
||||
meson setup _build-$env:MSYSTEM_PREFIX -Dprefix="$GIMP_PREFIX" $PKGCONF_RELOCATABLE_OPTION `
|
||||
-Dbuildtype=debugoptimized $clang_opts_meson `
|
||||
@@ -120,7 +119,11 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
|
||||
}
|
||||
elseif (Test-Path CMakeLists.txt -Type Leaf)
|
||||
{
|
||||
Add-Content CMakeLists.txt "install(CODE `"execute_process(COMMAND `${Python3_EXECUTABLE`} $("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py`)`")"
|
||||
if ("$env:MSYSTEM_PREFIX" -ne 'MINGW32')
|
||||
{
|
||||
Add-Content CMakeLists.txt "install(CODE `"execute_process(COMMAND `${Python3_EXECUTABLE`} $("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py`)`")"
|
||||
$clang_opts_cmake=@('-DCMAKE_C_FLAGS="-gcodeview"', '-DCMAKE_CXX_FLAGS="-gcodeview"', '-DCMAKE_EXE_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--pdb="')
|
||||
}
|
||||
cmake -G Ninja -B _build-$env:MSYSTEM_PREFIX -DCMAKE_INSTALL_PREFIX="$GIMP_PREFIX" `
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_COLOR_DIAGNOSTICS=ON $clang_opts_cmake `
|
||||
$(if ($branch -like '-*') { $branch } elseif ($patches -like '-*') { $patches } else { $options });
|
||||
|
Reference in New Issue
Block a user