Skip to content

Commit 7874265

Browse files
committed
Support building on msys/clang64
1 parent 639c676 commit 7874265

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/main.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ jobs:
193193
matrix:
194194
# Build each combination of OS and release/debug variants
195195
os: [ windows-2019 ]
196-
msystem: [ ucrt64, mingw64 ]
196+
msystem: [ ucrt64, mingw64, clang64 ]
197197
build-type: [ Release, Debug ]
198198
include:
199199
- msystem: ucrt64
@@ -202,6 +202,8 @@ jobs:
202202
- msystem: mingw64
203203
package-prefix: x86_64
204204
cmake-flags: LDFLAGS="-fuse-ld=lld -lstdc++ -lgcc_s"
205+
- msystem: clang64
206+
package-prefix: clang-x86_64
205207
# Don't abort runners if a single one fails
206208
fail-fast: false
207209
runs-on: ${{ matrix.os }}
@@ -229,7 +231,14 @@ jobs:
229231
working-directory: build
230232
run: |
231233
ctest -j 4 --output-on-failure -T test
232-
234+
- name: Install
235+
working-directory: build
236+
run: |
237+
cmake --install . --prefix=../dist
238+
- uses: actions/upload-artifact@v4
239+
with:
240+
name: ${{ matrix.msystem }}-${{ matrix.build-type }}
241+
path: dist/
233242

234243
# Fake check that can be used as a branch-protection rule.
235244
all-checks:

CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ endif()
2020

2121
enable_language(OBJC OBJCXX)
2222

23+
if (MINGW)
24+
set(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
25+
set(CMAKE_LINK_LIBRARY_SUFFIX "")
26+
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
27+
set(CMAKE_OBJCXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
28+
endif ()
29+
2330
INCLUDE (CheckCXXSourceCompiles)
2431
INCLUDE (FetchContent)
2532

@@ -301,6 +308,9 @@ if (NOT CMAKE_INSTALL_LIBDIR)
301308
set(CMAKE_INSTALL_LIBDIR lib)
302309
endif ()
303310

311+
if (NOT CMAKE_INSTALL_BINDIR)
312+
set(CMAKE_INSTALL_BINDIR bin)
313+
endif ()
304314

305315
set(GNUSTEP_INSTALL_TYPE ${DEFAULT_INSTALL_TYPE} CACHE STRING
306316
"GNUstep installation type. Options are NONE, SYSTEM, NETWORK or LOCAL.")

0 commit comments

Comments
 (0)