Skip to content

Commit 0928fc3

Browse files
committed
try doing the same on msys
1 parent 1c5f016 commit 0928fc3

File tree

2 files changed

+30
-27
lines changed

2 files changed

+30
-27
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,51 +37,46 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
include:
40-
# - os: "ubuntu-22.04"
41-
# shell: "bash"
42-
# BOOST_INSTALL_PREFIX: "/opt/smelibs"
43-
# BOOST_BOOTSTRAP_OPTIONS: "--with-toolset=clang"
44-
# BOOST_B2_OPTIONS: "cxxflags=-fPIC"
45-
# TBB_ENABLE_IPO: "ON"
46-
# - os: "ubuntu-22.04-arm"
47-
# shell: "bash"
48-
# BOOST_INSTALL_PREFIX: "/opt/smelibs"
49-
# BOOST_BOOTSTRAP_OPTIONS: "--with-toolset=clang"
50-
# BOOST_B2_OPTIONS: "cxxflags=-fPIC"
51-
# TBB_ENABLE_IPO: "ON"
40+
- os: "ubuntu-22.04"
41+
shell: "bash"
42+
BOOST_INSTALL_PREFIX: "/opt/smelibs"
43+
BOOST_BOOTSTRAP_OPTIONS: "--with-toolset=clang"
44+
BOOST_B2_OPTIONS: "cxxflags=-fPIC"
45+
TBB_ENABLE_IPO: "ON"
46+
- os: "ubuntu-22.04-arm"
47+
shell: "bash"
48+
BOOST_INSTALL_PREFIX: "/opt/smelibs"
49+
BOOST_BOOTSTRAP_OPTIONS: "--with-toolset=clang"
50+
BOOST_B2_OPTIONS: "cxxflags=-fPIC"
51+
TBB_ENABLE_IPO: "ON"
5252
- os: "macos-13"
5353
shell: "bash"
5454
BOOST_INSTALL_PREFIX: "/opt/smelibs"
5555
BOOST_B2_OPTIONS: 'cxxflags="-mmacosx-version-min=11" linkflags="-mmacosx-version-min=11"'
5656
TBB_ENABLE_IPO: "ON"
57-
VTK_OPTIONS: "-DFREETYPE_LIBRARY_RELEASE=/opt/smelibs/lib/libQt6BundledFreetype.a -DFREETYPE_INCLUDE_DIR_freetype2=/opt/smelibs/include/QtFreetype -DFREETYPE_INCLUDE_DIR_ft2build=/opt/smelibs/include/QtFreetype"
5857
- os: "macos-14"
5958
shell: "bash"
6059
BOOST_INSTALL_PREFIX: "/opt/smelibs"
6160
BOOST_B2_OPTIONS: 'cxxflags="-mmacosx-version-min=11" linkflags="-mmacosx-version-min=11"'
6261
TBB_ENABLE_IPO: "ON"
63-
VTK_OPTIONS: "-DFREETYPE_LIBRARY_RELEASE=/opt/smelibs/lib/libQt6BundledFreetype.a -DFREETYPE_INCLUDE_DIR_freetype2=/opt/smelibs/include/QtFreetype -DFREETYPE_INCLUDE_DIR_ft2build=/opt/smelibs/include/QtFreetype"
64-
# - os: "windows-2022"
65-
# shell: "msys2 {0}"
66-
# BOOST_INSTALL_PREFIX: "C:/smelibs"
67-
# BOOST_B2_OPTIONS: "address-model=64"
68-
# TBB_ENABLE_IPO: "OFF"
69-
# VTK_OPTIONS: "-DFREETYPE_LIBRARY_RELEASE=/c/smelibs/lib/libQt6BundledFreetype.a -DFREETYPE_INCLUDE_DIR_freetype2=/c/smelibs/include/QtFreetype -DFREETYPE_INCLUDE_DIR_ft2build=/c/smelibs/include/QtFreetype"
62+
- os: "windows-2022"
63+
shell: "msys2 {0}"
64+
BOOST_INSTALL_PREFIX: "C:/smelibs"
65+
BOOST_B2_OPTIONS: "address-model=64"
66+
TBB_ENABLE_IPO: "OFF"
7067
# - os: "windows-11-arm"
7168
# shell: "msys2 {0}"
7269
# BOOST_INSTALL_PREFIX: "C:/smelibs"
7370
# BOOST_B2_OPTIONS: "address-model=64"
7471
# TBB_ENABLE_IPO: "OFF"
75-
# VTK_OPTIONS: "-DFREETYPE_LIBRARY_RELEASE=/c/smelibs/lib/libQt6BundledFreetype.a -DFREETYPE_INCLUDE_DIR_freetype2=/c/smelibs/include/QtFreetype -DFREETYPE_INCLUDE_DIR_ft2build=/c/smelibs/include/QtFreetype"
7672
defaults:
7773
run:
7874
shell: ${{ matrix.shell }}
7975
env:
8076
BOOST_INSTALL_PREFIX: ${{ matrix.BOOST_INSTALL_PREFIX }}
81-
# BOOST_BOOTSTRAP_OPTIONS: ${{ matrix.BOOST_BOOTSTRAP_OPTIONS }}
77+
BOOST_BOOTSTRAP_OPTIONS: ${{ matrix.BOOST_BOOTSTRAP_OPTIONS }}
8278
BOOST_B2_OPTIONS: ${{ matrix.BOOST_B2_OPTIONS }}
8379
TBB_ENABLE_IPO: ${{ matrix.TBB_ENABLE_IPO }}
84-
VTK_OPTIONS: ${{ matrix.VTK_OPTIONS }}
8580
steps:
8681
- uses: spatial-model-editor/[email protected]
8782
with:

build.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,18 @@ time ninja
604604
${SUDO_CMD} ninja install
605605
cd ../../
606606

607-
# try to combine .a libs on macos only for now
608-
cp /opt/smelibs/lib/libQt6BundledFreetype.a /opt/smelibs/lib/ft.a
609-
libtool -static -o /opt/smelibs/lib/libCombinedFreetype.a /opt/smelibs/lib/libQt6BundledFreetype.a /opt/smelibs/lib/libQt6BundledLibpng.a /opt/smelibs/lib/libz.a
610-
VTK_OPTIONS="-DFREETYPE_LIBRARY_RELEASE=/opt/smelibs/lib/libCombinedFreetype.a -DFREETYPE_INCLUDE_DIR_freetype2=/opt/smelibs/include/QtFreetype -DFREETYPE_INCLUDE_DIR_ft2build=/opt/smelibs/include/QtFreetype"
607+
# combine the static libs implicitly required by qt's bundled freetype lib into a single .a lib for vtk to use
608+
if [ "$RUNNER_OS" != "Linux" ]; then
609+
if [ "$RUNNER_OS" == "macOS" ]; then
610+
# combine using libtool on mac
611+
libtool -static -o /opt/smelibs/lib/libCombinedFreetype.a /opt/smelibs/lib/libQt6BundledFreetype.a /opt/smelibs/lib/libQt6BundledLibpng.a /opt/smelibs/lib/libz.a
612+
elif [ "$RUNNER_OS" == "windows" ]; then
613+
# combine using ld and ar on msys
614+
ld -r -o libCombinedFreetype.o /opt/smelibs/lib/libQt6BundledFreetype.a /opt/smelibs/lib/libQt6BundledLibpng.a /opt/smelibs/lib/libz.a
615+
ar rcs /opt/smelibs/lib/libCombinedFreetype.a libCombinedFreetype.o
616+
fi
617+
VTK_OPTIONS="-DFREETYPE_LIBRARY_RELEASE=/opt/smelibs/lib/libCombinedFreetype.a -DFREETYPE_INCLUDE_DIR_freetype2=/opt/smelibs/include/QtFreetype -DFREETYPE_INCLUDE_DIR_ft2build=/opt/smelibs/include/QtFreetype"
618+
fi
611619

612620
# build minimal static version of VTK including GUISupportQt and RenderingQt modules
613621
git clone -b $VTK_VERSION --depth 1 https://github.com/Kitware/VTK.git

0 commit comments

Comments
 (0)