mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-24 20:57:00 +00:00
Examples: Fix MinGW detection in makefiles. Fix example_null build due to missing IME input libs. (#2590)
This commit is contained in:
parent
9b32f7bf2d
commit
3f5bb5939a
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -68,7 +68,7 @@ jobs:
|
|||||||
#include "examples/example_null/main.cpp"
|
#include "examples/example_null/main.cpp"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp
|
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp -limm32
|
||||||
|
|
||||||
- name: Build example_null (with IMGUI_DISABLE_WIN32_FUNCTIONS)
|
- name: Build example_null (with IMGUI_DISABLE_WIN32_FUNCTIONS)
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -81,7 +81,7 @@ jobs:
|
|||||||
#include "examples/example_null/main.cpp"
|
#include "examples/example_null/main.cpp"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp
|
g++ -I. -Wall -Wformat -o example_single_file.exe example_single_file.cpp -limm32
|
||||||
|
|
||||||
- name: Build example_null (as DLL)
|
- name: Build example_null (as DLL)
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
@ -49,7 +49,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
|||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(OS), Windows_NT)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
|
LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
|||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(OS), Windows_NT)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
|
LIBS += -lglfw3 -lgdi32 -lopengl32 -limm32
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
|||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(OS), Windows_NT)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
LIBS += -lgdi32 -lopengl32 -limm32
|
LIBS += -lgdi32 -lopengl32 -limm32
|
||||||
ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes)
|
ifeq ($(shell pkg-config freeglut --exists 2> /dev/null && echo yes || echo no),yes)
|
||||||
|
@ -57,12 +57,12 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
|||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(OS), Windows_NT)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
ifneq ($(WITH_EXTRA_WARNINGS), 0)
|
ifneq ($(WITH_EXTRA_WARNINGS), 0)
|
||||||
CXXFLAGS += -Wextra -Wpedantic
|
CXXFLAGS += -Wextra -Wpedantic
|
||||||
LIBS += -limm32
|
|
||||||
endif
|
endif
|
||||||
|
LIBS += -limm32
|
||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
|
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
|
||||||
mkdir Debug
|
mkdir Debug
|
||||||
cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib
|
cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib
|
||||||
|
@ -48,7 +48,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
|||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(OS), Windows_NT)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
|
LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
|
||||||
|
|
||||||
|
@ -78,12 +78,12 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
|||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
|
ifeq ($(OS), Windows_NT)
|
||||||
ECHO_MESSAGE = "MinGW"
|
ECHO_MESSAGE = "MinGW"
|
||||||
LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
|
LIBS += -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
|
||||||
|
|
||||||
CXXFLAGS += `pkg-config --cflags sdl2`
|
CXXFLAGS += `pkg-config --cflags sdl2`
|
||||||
CFLAGS = $(CXXFLAGS)
|
CFLAGS = $(CXXFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
##---------------------------------------------------------------------
|
##---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user