This repository was archived by the owner on May 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 40
40
runs-on : windows-latest
41
41
steps :
42
42
- uses : actions/checkout@v4
43
- # TODO: build using MSVC. It currently errors and warns on a whole bunch of stuff
44
- # Also yes, that requires either shenanigans or a seperate action. - uses: ilammy/msvc-dev-cmd@v1
43
+ # Build using MSVC. It currently warns on a bit of stuff because apparently -Wall warns on basically everything
44
+ # Also yes, using mvsc requires either shenanigans or a seperate action.
45
+ - uses : ilammy/msvc-dev-cmd@v1
45
46
- name : Make target ${{ matrix.target }}
46
- run : $env:TARGET='${{ matrix.target }}'; make
47
+ run : $env:CXX='cl.exe'; $env: TARGET='${{ matrix.target }}'; make
Original file line number Diff line number Diff line change 3
3
SRCDIR := $(abspath $(patsubst % /,% ,$(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) ) ) )
4
4
5
5
CFLAGS_gtk = -DFLIPS_GTK $(GTKFLAGS ) $(GTKLIBS )
6
- CFLAGS_windows := -DFLIPS_WINDOWS -mwindows -lgdi32 -lcomdlg32 -lcomctl32 -luser32 -lkernel32 -lshell32 -ladvapi32
6
+ CFLAGS_windows_base := -DFLIPS_WINDOWS
7
+ CFLAGS_windows_gcc := -mwindows -lgdi32 -lcomdlg32 -lcomctl32 -luser32 -lkernel32 -lshell32 -ladvapi32
8
+ CFLAGS_windows := $(CFLAGS_windows_base ) $(CFLAGS_windows_gcc )
9
+ LFLAGS_windows_msvc := gdi32.lib comdlg32.lib comctl32.lib user32.lib kernel32.lib shell32.lib advapi32.lib
7
10
CFLAGS_cli := -DFLIPS_CLI
8
11
9
12
CFLAGS_G = -fno-rtti -fno-exceptions -DNDEBUG -Wall
@@ -52,6 +55,14 @@ ifeq ($(TARGET),)
52
55
endif
53
56
endif
54
57
58
+ ifeq ($(TARGET ) ,windows)
59
+ ifneq (,$(filter $(CXX),cl cl.exe))
60
+ override CFLAGS_windows := $(CFLAGS_windows_base )
61
+ LFLAGS += $(LFLAGS_windows_msvc )
62
+ endif
63
+
64
+ endif
65
+
55
66
ifeq ($(TARGET ) ,gtk)
56
67
ifeq ($(GTKFLAGS),)
57
68
GTKFLAGS := $(shell pkg-config --cflags --libs gtk+-3.0)
You can’t perform that action at this time.
0 commit comments