Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
path: 'fluxengine-testdata'
- name: brew
run: |
brew install sqlite pkg-config libusb protobuf wxwidgets fmt make coreutils dylibbundler libjpeg libmagic nlohmann-json cli11 boost glfw3 md4c ninja python freetype2 mbedtls@3
brew install sqlite pkg-config libusb protobuf wxwidgets fmt make coreutils dylibbundler libjpeg libmagic nlohmann-json cli11 boost glfw3 md4c ninja python freetype2 mbedtls@3 lunasvg
brew link mbedtls@3
brew upgrade
- name: make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:

- name: brew
run: |
brew install sqlite pkg-config libusb protobuf wxwidgets fmt make coreutils dylibbundler libjpeg libmagic nlohmann-json cli11 boost glfw3 md4c ninja python freetype2 mbedtls@3
brew install sqlite pkg-config libusb protobuf wxwidgets fmt make coreutils dylibbundler libjpeg libmagic nlohmann-json cli11 boost glfw3 md4c ninja python freetype2 mbedtls@3 lunasvg
brew link mbedtls@3
brew upgrade

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ ifeq ($(BUILDTYPE),windows)
else
CC = clang
CXX = clang++
CFLAGS = \
CFLAGS += \
$(OPTFLAGS) \
-I/opt/homebrew/include -I/usr/local/include \
-Wno-unknown-warning-option
CXXFLAGS = \
CXXFLAGS += \
$(OPTFLAGS) \
-std=c++23 \
-fexperimental-library \
Expand All @@ -56,7 +56,7 @@ else
-Wformat-security \
-Wno-deprecated-enum-float-conversion \
-Wno-deprecated-enum-enum-conversion
LDFLAGS =
LDFLAGS +=
AR = ar
PKG_CONFIG = pkg-config
ifeq ($(BUILDTYPE),osx)
Expand All @@ -67,7 +67,7 @@ endif

HOSTCC = gcc
HOSTCXX = g++ -std=c++20
HOSTCFLAGS = -g -O3
HOSTCFLAGS += -g -O3
HOSTLDFLAGS =

REALOBJ = .obj
Expand Down
2 changes: 2 additions & 0 deletions build/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def get_property(self, name, flag):

def _package(self, name, package, fallback, pkgconfig):
if pkgconfig.has_package(package):
print(f"package '{package}' found")
cflags = pkgconfig.get_property(package, "--cflags")
ldflags = pkgconfig.get_property(package, "--libs")

Expand All @@ -50,6 +51,7 @@ def _package(self, name, package, fallback, pkgconfig):
return

assert fallback, f"Required package '{package}' not installed"
print(f"package '{package}' not found; using fallback")

if "cheader_deps" in fallback.args:
self.args["cheader_deps"] = fallback.args["cheader_deps"]
Expand Down
14 changes: 8 additions & 6 deletions doc/building-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ install some support packages. **You will need to check out git with submodules

- For Linux with Ubuntu/Debian:
`libudev-dev` `libsqlite3-dev` `protobuf-compiler` `libfmt-dev`
`libprotobuf-dev` `libmagic-dev` `libmbedtls-dev`
`libcurl4-openssl-dev` `libmagic-dev` `nlohmann-json3-dev`
`libdbus-1-dev` `libglfw3-dev` `libmd4c-dev` `libfreetype-dev`
`libcli11-dev` `libboost-regex-dev`
`libprotobuf-dev` `libmagic-dev` `libmbedtls-dev` `libcurl4-openssl-dev`
`libmagic-dev` `libdbus-1-dev` `libglfw3-dev` `libfreetype-dev`
`libboost-regex-dev` Plus, optionally (if not present, internal versions
will be used): `nlohmann-json3-dev` `libcli11-dev` `libmd4c-dev`
- For OSX with Homebrew:
`sqlite` `pkg-config` `libusb` `protobuf` `fmt` `make` `coreutils`
`dylibbundler` `libjpeg` `libmagic` `nlohmann-json` `cli11` `boost`
`glfw3` `md4c` `ninja` `python` `freetype2` `mbedtls`
`dylibbundler` `libjpeg` `libmagic` `boost` `glfw3` `ninja` `python`
`freetype2` `mbedtls` Plus, optionally (if not present, internal versions
will be used): `nlohmann-json` `cli11` `md4c` `lunasvg`
- For Windows with MSYS and pacboy:
`python` `diffutils` `ninja` `make` `zip` `mingw-w64-cross-clang`
`protobuf:p` `pkgconf:p` `curl-winssl:p` `file:p` `glfw:p` `mbedtls:p`
`sqlite:p` `freetype:p` `boost:p` `gcc:p` `binutils:p` `nsis:p`
`abseil-cpp:p`
Expand Down
44 changes: 32 additions & 12 deletions src/gui2/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,35 @@ def sources_from(path, except_for=[]):
package(name="magic_lib", package="libmagic")
package(name="mbedtls_lib", package="mbedtls")

cxxlibrary(
package(
name="nlohmannjson_lib",
srcs=[],
hdrs=headers_from("dep/nlohmann_json/single_include"),
package="nlohmann_json",
fallback=cxxlibrary(
name="nlohmannjson_fallback_lib",
srcs=[],
hdrs=headers_from("dep/nlohmann_json/single_include"),
),
)

clibrary(
package(
name="md4c_lib",
srcs=sources_from("dep/md4c/src"),
hdrs={"md4c.h": "dep/md4c/src/md4c.h"},
package="md4c",
fallback=clibrary(
name="md4c_fallback_lib",
srcs=sources_from("dep/md4c/src"),
hdrs={"md4c.h": "dep/md4c/src/md4c.h"},
),
)

cxxlibrary(name="cli11_lib", srcs=[], hdrs=headers_from("dep/cli11/include"))
package(
name="cli11_lib",
package="CLI11",
fallback=cxxlibrary(
name="cli11_fallback_lib",
srcs=[],
hdrs=headers_from("dep/cli11/include"),
),
)

if config.osx:
clibrary(
Expand Down Expand Up @@ -95,12 +111,16 @@ def sources_from(path, except_for=[]):
cflags=cflags,
)

cxxlibrary(
package(
name="lunasvg",
srcs=sources_from("dep/lunasvg/source"),
hdrs=headers_from("dep/lunasvg/include"),
deps=[".+plutovg", "+fmt_lib"],
cflags=cflags,
package="lunasvg",
fallback=cxxlibrary(
name="lunasvg_fallback_lib",
srcs=sources_from("dep/lunasvg/source"),
hdrs=headers_from("dep/lunasvg/include"),
deps=[".+plutovg", "+fmt_lib"],
cflags=cflags,
),
)

cxxlibrary(
Expand Down