Skip to content

Commit c3ad276

Browse files
committed
add cmake build
exclude config.h.in in gitignore try fltk 1.3 try again try again some cmake fixes for FLTK 1.3\ remove make test for the time being skip looking for fluid use fetch content fix build use find_package(PkgConfig REQUIRED) for webp fix build on macos remove windows for now fixes fixes fetch git for cygwin fix for cygwin define HAVE_TRUNC for cygwin try webp on cygwin use pkg-config for webp try finding webp on macos try /usr/local/opt/webp/lib on macos try crosscompilation download gl libs for crosscompiling check try with FLTK 1.3 for FLTK 1.3, use plain find_package try again for macos fixes support older cmake build for macos fix cmake.yml debug DILLO_FLTK_INCLUDE_DIRS debug FLTK_INCLUDE_DIRS on macos fix build on macos remove DNDEBUG flag when building for Release link windows libs for fltk 1.3 targeting msvc or mingw Update cmake.yml add warning when building against FLTK 1.4
1 parent f10a780 commit c3ad276

File tree

18 files changed

+1412
-0
lines changed

18 files changed

+1412
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: cmake
7+
8+
jobs:
9+
ubuntu-latest-html-tests:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
with:
14+
fetch-depth: 1
15+
- name: Install dependencies
16+
run: sudo apt install -y libfltk1.3-dev libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev libssl-dev libwebp-dev xvfb x11-apps x11-utils imagemagick ninja-build
17+
18+
- name: config
19+
run: cmake -Bbuild -GNinja -DDILLO_BUILD_TESTS=ON -DENABLE_HTML_TESTS=ON -DCMAKE_INSTALL_PREFIX=$(readlink -f install)
20+
- name: build
21+
run: cmake --build build --parallel
22+
- name: install
23+
run: cmake --install build
24+
- name: Copy config to .dillo
25+
run: |
26+
mkdir -p ~/.dillo/
27+
cp install/etc/dillo/* ~/.dillo/
28+
- name: make test
29+
continue-on-error: true
30+
run: |
31+
export DILLOBIN=$(readlink -f install/bin/dillo)
32+
cd build && ninja test || (cat test/html/test-suite.log; false)
33+
export DILLOBIN=
34+
ubuntu-latest-no-tls:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v1
38+
with:
39+
fetch-depth: 1
40+
- name: Install dependencies
41+
run: sudo apt install -y libfltk1.3-dev libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev
42+
- name: configure
43+
run: cmake -Bbuild -DENABLE_TLS=OFF
44+
- name: make
45+
run: cmake --build build --parallel
46+
ubuntu-latest-mbedtls2:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v1
50+
with:
51+
fetch-depth: 1
52+
- name: Install dependencies
53+
run: sudo apt install -y libfltk1.3-dev libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev libmbedtls-dev
54+
- name: configure
55+
run: cmake -Bbuild -DENABLE_TLS=ON -DENABLE_MBEDTLS=ON
56+
- name: make
57+
run: cmake --build build --parallel
58+
ubuntu-latest-openssl-3:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v1
62+
with:
63+
fetch-depth: 1
64+
- name: Install dependencies
65+
run: sudo apt install -y libfltk1.3-dev libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev libssl-dev
66+
- name: configure
67+
run: cmake -Bbuild -DENABLE_TLS=ON -DENABLE_MBEDTLS=OFF
68+
- name: make
69+
run: cmake --build build --parallel
70+
alpine-mbedtls-3_6_0:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
- uses: jirutka/setup-alpine@v1
75+
with:
76+
packages: >
77+
git
78+
build-base
79+
cmake
80+
fltk-dev
81+
fltk-fluid
82+
libfltk_cairo
83+
pango-dev
84+
fontconfig-dev
85+
libxinerama-dev
86+
libxfixes-dev
87+
libxcursor-dev
88+
mesa-gl
89+
libpng-dev
90+
libjpeg-turbo-dev
91+
libwebp-dev
92+
mbedtls-dev
93+
- run: |
94+
cmake -DFLTK_BUILD_GL=OFF -Bbuild -DENABLE_TLS=ON -DENABLE_OPENSSL=OFF
95+
cmake --build build --parallel
96+
shell: alpine.sh {0}
97+
macOS-13-openssl-1-1:
98+
runs-on: macos-13
99+
steps:
100+
- uses: actions/checkout@v1
101+
with:
102+
fetch-depth: 1
103+
- name: Install dependencies
104+
run: |
105+
pkg-config --debug libwebp
106+
brew install cmake fltk@1.3
107+
brew link fltk@1.3
108+
- name: Build
109+
run: |
110+
export LDFLAGS="-L/usr/local/opt/fltk@1.3/lib"
111+
export CPPFLAGS="-I/usr/local/opt/fltk@1.3/include"
112+
cmake -DCMAKE_PREFIX_PATH=/opt/homebrew -Bbuild -DENABLE_TLS=ON
113+
LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/webp/lib cmake --build build --parallel
114+
freebsd-14-openssl-3:
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v4
118+
- name: FreeBSD VM build
119+
id: test
120+
uses: vmactions/freebsd-vm@v1
121+
with:
122+
release: "14.0"
123+
usesh: true
124+
prepare: |
125+
set -x
126+
pkg install -y git cmake fltk jpeg-turbo png cairo pango fontconfig freetype2 libX11 libXext libXfixes libXdamage mesa-libs pkgconf gmake libXres binutils webp libiconv openssl
127+
run: |
128+
set -x
129+
pwd
130+
freebsd-version
131+
CFLAGS='-I/usr/local/include' CXXFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib' cmake -Bbuild -DENABLE_TLS=ON && cmake --build build
132+
ldd build/src/dillo
133+
windows-mbedtls:
134+
runs-on: windows-latest
135+
steps:
136+
- run: git config --global core.autocrlf input
137+
- uses: actions/checkout@v4
138+
with:
139+
fetch-depth: 1
140+
- uses: cygwin/cygwin-install-action@master
141+
with:
142+
packages: git gcc-core gcc-g++ cmake make ninja libfltk-devel fluid zlib-devel mbedtls-devel libiconv-devel libpng-devel libjpeg-devel libwebp-devel libgif-devel libX11-devel libXcursor-devel libXext-devel libXfixes-devel libXft-devel libXinerama-devel libXrender-devel libfontconfig-devel libpango1.0-devel libcairo-devel
143+
- shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
144+
run: |
145+
set -x
146+
cd ${GITHUB_WORKSPACE}
147+
pwd
148+
ls -l
149+
CXXFLAGS='-DHAVE_TRUNC=1' cmake -GNinja -DFLTK_BACKEND_X11=ON -DFLTK_USE_PANGO=ON -DFLTK_BUILD_GL=OFF -Bbuild -DENABLE_TLS=ON -DENABLE_OPENSSL=OFF && cmake --build build
150+
ubuntu-arm-latest-openssl:
151+
name: Check-arm64
152+
runs-on: ubuntu-22.04
153+
env:
154+
CC: aarch64-linux-gnu-gcc
155+
CXX: aarch64-linux-gnu-g++
156+
PKG_CONFIG_PATH: "/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
157+
steps:
158+
- name: Checkout sources
159+
uses: actions/checkout@v4
160+
- name: Download deps
161+
run: |
162+
git submodule update --init --recursive
163+
sudo dpkg --add-architecture arm64
164+
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -c -s) main restricted universe multiverse" | sudo tee /etc/apt/sources.list
165+
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -c -s)-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
166+
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -c -s)-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
167+
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $(lsb_release -c -s)-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
168+
echo "deb [arch=arm64] http://ports.ubuntu.com/ $(lsb_release -c -s) main multiverse universe" | sudo tee -a /etc/apt/sources.list
169+
echo "deb [arch=arm64] http://ports.ubuntu.com/ $(lsb_release -c -s)-security main multiverse universe" | sudo tee -a /etc/apt/sources.list
170+
echo "deb [arch=arm64] http://ports.ubuntu.com/ $(lsb_release -c -s)-backports main multiverse universe" | sudo tee -a /etc/apt/sources.list
171+
echo "deb [arch=arm64] http://ports.ubuntu.com/ $(lsb_release -c -s)-updates main multiverse universe" | sudo tee -a /etc/apt/sources.list
172+
sudo apt-get update -y
173+
sudo apt-get install -y libpango1.0-dev:arm64 libx11-dev:arm64 libxext-dev:arm64 libxft-dev:arm64 libxinerama-dev:arm64 libxcursor-dev:arm64 libxrender-dev:arm64 libxfixes-dev:arm64 libpng-dev:arm64 libasound2-dev:arm64 libssl-dev:arm64 libwebp-dev:arm64 libjpeg-dev:arm64 libgl1-mesa-dev:arm64 libglu1-mesa-dev:arm64
174+
sudo apt-get install g++-aarch64-linux-gnu ninja-build
175+
- run: cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -GNinja -Bbuild -DENABLE_FLTK_1_4=ON -DENABLE_TLS=ON && cmake --build build --parallel
176+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.a
22
*.o
33
config.*
4+
!config.h.in
45
autom4te.cache
56
Makefile
67
Makefile.in
@@ -45,3 +46,5 @@ tags
4546
/test/shapes
4647
/test/trie
4748
/test/unicode-test
49+
/bin
50+
/install

0 commit comments

Comments
 (0)