mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-24 00:26:36 +00:00
CI: Test builds with freetype on linux.
This commit is contained in:
parent
bdd31ec4db
commit
ac5ffffc23
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@ -166,7 +166,7 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libglfw3-dev libsdl2-dev gcc-multilib g++-multilib
|
||||
sudo apt-get install -y libglfw3-dev libsdl2-dev gcc-multilib g++-multilib libfreetype6-dev
|
||||
|
||||
- name: Build example_null (extra warnings, gcc 32-bit)
|
||||
run: |
|
||||
@ -188,6 +188,11 @@ jobs:
|
||||
make -C examples/example_null clean
|
||||
CXXFLAGS="$CXXFLAGS -m64 -Werror" CXX=clang++ make -C examples/example_null EXTRA_WARNINGS=1
|
||||
|
||||
- name: Build example_null (freetype)
|
||||
run: |
|
||||
make -C examples/example_null clean
|
||||
make -C examples/example_null WITH_FREETYPE=1
|
||||
|
||||
- name: Build example_null (single file build)
|
||||
run: |
|
||||
echo '#define IMGUI_IMPLEMENTATION' > example_single_file.cpp
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
EXE = example_null
|
||||
EXTRA_WARNINGS ?= 0
|
||||
WITH_FREETYPE ?= 0
|
||||
SOURCES = main.cpp
|
||||
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
|
||||
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
|
||||
@ -19,6 +20,13 @@ ifeq ($(EXTRA_WARNINGS), 1)
|
||||
CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
|
||||
endif
|
||||
|
||||
# We use the WITH_FREETYPE flag on our CI setup to test misc/freetype/imgui_freetype.cpp font rasterizer
|
||||
ifeq ($(WITH_FREETYPE), 1)
|
||||
SOURCES += ../../misc/freetype/imgui_freetype.cpp
|
||||
CXXFLAGS += $(shell pkg-config --cflags freetype2)
|
||||
LIBS += $(shell pkg-config --libs freetype2)
|
||||
endif
|
||||
|
||||
##---------------------------------------------------------------------
|
||||
## BUILD FLAGS PER PLATFORM
|
||||
##---------------------------------------------------------------------
|
||||
@ -60,6 +68,9 @@ endif
|
||||
%.o:../../%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
%.o:../../misc/freetype/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
all: $(EXE)
|
||||
@echo Build complete for $(ECHO_MESSAGE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user