Skip to content

Instantly share code, notes, and snippets.

@skhaz
Created June 18, 2016 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skhaz/5377c818cd857baa96afbeebac5281fa to your computer and use it in GitHub Desktop.
Save skhaz/5377c818cd857baa96afbeebac5281fa to your computer and use it in GitHub Desktop.
SDL2 QMake
TEMPLATE = app
CONFIG -= console
CONFIG -= app_bundle
CONFIG -= qt
CONFIG -= windows
SDL2_PATH = D:\Workspace\SDL2
LIBS += -L $${SDL2_PATH}\lib -lSDL2 -lSDL2main -lSDL2_image
INCLUDEPATH += $${SDL2_PATH}\include
win32:QMAKE_LIBS_QT_ENGTRY -= -lqtmain
win32-g++:DEFINES -=QT_NEEDS_QMAIN
QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
QMAKE_LFLAGS += -lSDL2main -lSDL2 -lSDL2_image -mwindows
QMAKE_LINK += -lSDL2main -lSDL2 -lSDL2_image -mwindows
DESTDIR = output
OBJECTS_DIR = output/.obj
SOURCES += main.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment