Skip to content

Commit

Permalink
simplified qmake build process
Browse files Browse the repository at this point in the history
  • Loading branch information
ppiecuch committed Mar 3, 2016
1 parent eebd300 commit e3f0ac1
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .qmake.stash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
QMAKE_XCODE_DEVELOPER_PATH = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer
QMAKE_XCODE_VERSION = 7.2
QMAKE_MAC_SDK.macosx.path = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
QMAKE_MAC_SDK.macosx.platform_path = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
QMAKE_MAC_SDK.macosx.version = 10.11
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_CC = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_CXX = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_FIX_RPATH = \
/Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool \
-id
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_AR = \
/Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar \
cq
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_RANLIB = \
/Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib \
-s
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_LINK = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
QMAKE_MAC_SDK.macx-clang.macosx.QMAKE_LINK_SHLIB = /Volumes/MacHDD/Users/piecuchp/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
QMAKE_MAC_SDK.macosx.platform_name = macosx
3 changes: 3 additions & 0 deletions AwesomeBump.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += Sources
160 changes: 160 additions & 0 deletions Sources/Sources.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
TEMPLATE = app
CONFIG += c++11
QT += opengl gui widgets

isEmpty(TOP_DIR) {
ERROR("Run build process from the top directory")
}

QTN=utils/QtnProperty
include($$QTN/Common.pri)
include($$QTN/PEG.pri)


PEG_SOURCES += properties/Filter3DDOF.pef \
properties/Filter3DBloom.pef \
properties/Filter3DLensFlares.pef \
properties/Filter3DToneMapping.pef \
properties/GLSLParsedFragShader.pef \
properties/ImageProperties.pef \
properties/Filters3D.pef


release_gl330 {
DEFINES += USE_OPENGL_330
TARGET = AwesomeBumpGL330
} else {
TARGET = AwesomeBump
}

debug: DBG = -dgb
GL = -gl4
release_gl330: GL = -gl3

win32: LIBS += Opengl32.lib

SPEC=$$[QMAKE_SPEC]$$DBG$$GL
DESTDIR = $$TOP_DIR/workdir/$$SPEC/bin
OBJECTS_DIR = $$TOP_DIR/workdir/$$SPEC/obj
MOC_DIR = $$TOP_DIR/workdir/$$SPEC/moc
UI_DIR = $$TOP_DIR/workdir/$$SPEC/obj
RCC_DIR = $$TOP_DIR/workdir/$$SPEC/obj

write_file("$$TOP_DIR/workdir/current", SPEC)


# It's now required to define the path for resource files
# at compile time
# To keep compatibility with older releases, the application
# continues to look for these resource files in its current
# directory's subfolders (Config/* and Core/*) when using
# qmake to compile
DEFINES += RESOURCE_BASE=\\\"./\\\"

VPATH += ../shared
INCLUDEPATH += ../shared include utils utils/QtnProperty

HEADERS = glwidget.h \
mainwindow.h \
CommonObjects.h \
formimageprop.h \
glimageeditor.h \
camera.h \
dialogheightcalculator.h \
qopenglerrorcheck.h \
utils/Mesh.hpp \
utils/tinyobj/tiny_obj_loader.h \
formsettingsfield.h \
formsettingscontainer.h \
utils/qglbuffers.h \
dialoglogger.h \
glwidgetbase.h \
formbasemapconversionlevels.h \
formmaterialindicesmanager.h \
dialogshortcuts.h \
allaboutdialog.h \
formimagebase.h \
dockwidget3dsettings.h \
gpuinfo.h \
properties/Dialog3DGeneralSettings.h \
utils/glslshaderparser.h \
utils/glslparsedshadercontainer.h \
properties/propertyconstructor.h \
properties/propertydelegateabfloatslider.h

SOURCES = glwidget.cpp \
main.cpp \
mainwindow.cpp \
formimageprop.cpp \
glimageeditor.cpp \
CommonObjects.cpp \
camera.cpp \
dialogheightcalculator.cpp \
utils/Mesh.cpp \
utils/tinyobj/tiny_obj_loader.cc \
formsettingsfield.cpp \
formsettingscontainer.cpp \
utils/qglbuffers.cpp \
dialoglogger.cpp \
glwidgetbase.cpp \
formbasemapconversionlevels.cpp \
formmaterialindicesmanager.cpp \
dialogshortcuts.cpp \
allaboutdialog.cpp \
formimagebase.cpp \
dockwidget3dsettings.cpp \
gpuinfo.cpp \
properties/Dialog3DGeneralSettings.cpp \
utils/glslshaderparser.cpp \
utils/glslparsedshadercontainer.cpp \
properties/propertydelegateabfloatslider.cpp


RESOURCES += content.qrc

RC_FILE = icon.rc

FORMS += \
mainwindow.ui \
formimageprop.ui \
dialogheightcalculator.ui \
formsettingsfield.ui \
formsettingscontainer.ui \
dialoglogger.ui \
formbasemapconversionlevels.ui \
formmaterialindicesmanager.ui \
allaboutdialog.ui \
dialogshortcuts.ui \
dockwidget3dsettings.ui \
properties/Dialog3DGeneralSettings.ui

ICON = resources/icon.icns

DISTFILES += \
resources/quad.obj \
properties/Filter3DDOF.pef \
properties/Filter3DBloom.pef \
properties/Filter3DLensFlares.pef \
properties/Filter3DToneMapping.pef \
properties/Filters3D.pef \
properties/GLSLParsedFragShader.pef \
properties/ImageProperties.pef


# install additional files into target destination
# (require "make install")
config.path = $$DESTDIR
config.files += $$TOP_DIR/Bin/Configs $$TOP_DIR/Bin/Core
INSTALLS += config

exists("utils/QtnProperty/QtnProperty.pri") {
DEFINES += HAVE_QTNPROP
include("utils/QtnProperty/QtnProperty.pri")
} else {
error("QtnProperty not found. Did you forget to 'git submodule init/update'")
}

exists("utils/quazip/quazip.pri") {
CONFIG += quazip_include_zip quazip_include_unzip
include("utils/quazip/quazip.pri")
}
13 changes: 9 additions & 4 deletions unixBuildScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
fi

# Add your QT path here
MY_QT_PATH=~/Qt/5.4/$tool/bin/
MY_QT_PATH=~/Qt/5.5/$tool/bin/
export PATH=$MY_QT_PATH:$PATH

( cd Sources && qmake && make ) \
&& cp -r Sources/Build/Bin/AwesomeBump$exe ./Bin \
&& open ./Bin/AwesomeBump$exe
if [ ! -e "$MY_QT_PATH" ]; then
echo "Qt not found at $MY_QT_PATH"
exit 1
fi

qmake \
&& make \
&& cp -r Sources/Build/Bin/AwesomeBump$exe ./Bin

0 comments on commit e3f0ac1

Please sign in to comment.