Skip to content

Commit

Permalink
Build only debug or release on Windows.
Browse files Browse the repository at this point in the history
On Windows we cannot mix debug and release build.
So we have to choose only one.
  • Loading branch information
mgautierfr committed Aug 26, 2024
1 parent 1e4b88d commit ce4d039
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion kiwixbuild/dependencies/kiwix_desktop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from kiwixbuild._global import option
from .base import Dependency, GitClone, QMakeBuilder
import platform


class KiwixDesktop(Dependency):
Expand All @@ -11,11 +13,24 @@ class Source(GitClone):

class Builder(QMakeBuilder):
dependencies = ["qt", "qtwebengine", "libkiwix", "aria2"]
make_install_targets = ["install"]
configure_env = None

flatpack_build_options = {"env": {"QMAKEPATH": "/app/lib"}}

@property
def make_targets(self):
if platform.system() == "Windows":
yield "release-all" if option("make_release") else "debug-all"
else:
yield from super().make_targets

@property
def make_install_targets(self):
if platform.system() == "Windows":
yield "release-install" if option("make_release") else "debug-install"
else:
yield "install"

@property
def configure_options(self):
if self.buildEnv.configInfo.name != "flatpak":
Expand Down

0 comments on commit ce4d039

Please sign in to comment.