Add /Zo to release flags for improved optimized build debugging

Updated compiler.pri to make use of the new /Zo
option to improve our debugging capabilities on optimized
builds. This flag is officially supported since
Visual Studio 2013 Update 3.

include(qt.pri)

CONFIG *= warn_on

win32 {
	# Import dependency paths for windows
	include(winpaths_default.pri)

	INCLUDEPATH *= "$$BOOST_PATH/include" "$$BOOST_PATH/include/boost-1_49/"
	QMAKE_LIBDIR *= "$$OPENSSL_PATH/lib" "$$LIBSNDFILE_PATH/lib" "$$BOOST_PATH/lib"
	INCLUDEPATH *= "$$OPENSSL_PATH/include" "$$LIBSNDFILE_PATH/include"

	# Sanity check that DXSDK_DIR, LIB and INCLUDE are properly set up.
	#
	# On Windows/x86, we build using the VS2013 v120_xp toolchain, which targets
	# a slightly modified Win7 SDK that still allows building for Windows XP. In that
	# environment, we must use the "external" DirectX SDK (June 2010). This SDK is
	# specified via the SXSDK_DIR.
	#
	# On Windows/amd64, we build using the VS2013 v120 platform, and we target the
	# Windows 8.1 SDK. In this setup, we use the DirectX SDK included with the Windows
	# 8.1 SDK, but only to a point. The bundled SDK does not include all things that
	# we depend on for the overlay, such as d3dx{9,10,11}. To overcome this, we use
	# both SDKs: the one bundled with the Windows 8.1 SDK for most libraries, and the
	# external June 2010 variant for the things that are not in the Windows 8.1 SDK
	# variant of the DirectX SDK. This is the approach recommended by Microsoft:
	# http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx
	# (see step 5).
	#
	# Because of these things, the Windows build currently expects the build environment
	# to properly set up the LIB and INCLUDE environment variables, with correct ordering
	# of the Windows SDK and DirectX depending on the platform we're targetting.
	# It's tough to check these things with qmake, we'll have to do with a simple sanity
	# check for the presence of the variables.
	DXSDK_DIR_VAR=$$(DXSDK_DIR)
	INCLUDE_VAR=$$(INCLUDE)
	LIB_VAR=$$(LIB)
	isEmpty(DXSDK_DIR_VAR) {
		error("Missing DXSDK_DIR environment variable. Are you missing the DirectX SDK (June 2010)?")
	}
	isEmpty(LIB_VAR) {
		error("The LIB environment variable is not set. Are you not in a build environment?")
	}
	isEmpty(INCLUDE_VAR) {
		error("The INCLUDE environment variable is not set. Are you not in a build environment?")
	}

	CONFIG(intelcpp) {
		DEFINES *= USE_INTEL_IPP
		DEFINES *= RESTRICT=restrict
		DEFINES *= VAR_ARRAYS
		QMAKE_CC = icl
		QMAKE_CXX = icl
		QMAKE_LIB = xilib /nologo
		QMAKE_LINK = xilink
		QMAKE_CFLAGS *= -Qstd=c99 -Qrestrict -Qvc9
		QMAKE_CXXFLAGS *= -Qstd=c++0x -Qrestrict -Qvc9

		QMAKE_CFLAGS_LTCG =
		QMAKE_CXXFLAGS_LTCG =
		QMAKE_LFLAGS_LTCG =

		QMAKE_CFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CFLAGS_RELEASE -=-arch:SSE
		QMAKE_CFLAGS_RELEASE -= -GL

		QMAKE_CXXFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CXXFLAGS_RELEASE -=-arch:SSE
		QMAKE_CXXFLAGS_RELEASE -= -GL

		QMAKE_CFLAGS_DEBUG *= -O2 -Ob0
		QMAKE_CXXFLAGS_DEBUG *= -O2 -Ob0

		CONFIG(optgen) {
			QMAKE_CFLAGS *= -Qprof-gen
			QMAKE_CXXFLAGS *= -Qprof-gen
		}

		CONFIG(optimize) {
			QMAKE_CFLAGS *= -Qprof-use
			QMAKE_CXXFLAGS *= -Qprof-use
		}
	} else {
		QMAKE_CFLAGS_RELEASE *= -Ox /fp:fast
		QMAKE_CXXFLAGS_RELEASE *= -Ox /fp:fast

		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_LFLAGS_RELEASE -= /SafeSEH
		}

		# MSVS 2012 and 2013's cl.exe will generate SSE2 code by default,
		# unless an explict arch is set.
		# For our non-64 x86 builds, our binaries should not contain any
		# SSE2 code, so override the default by using -arch:SSE.
		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_CFLAGS_RELEASE *= -arch:SSE
			QMAKE_CXXFLAGS_RELEASE *= -arch:SSE
		}

		# Qt 5.4 uses -Zc:strictStrings by default on MSVS 2013.
		# TextToSpeech_win.cpp uses sapi.h, which isn't compatible
		# with the strictStrings option due to bad conversions
		# in some of its functions's default parameters.
		QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
		QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
		QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
		QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings

		# Explicitly set the subsystem versions to
		# 5.01 (XP) for x86 and 6.00 (Vista) for x64.
		#
		# Qt expands the @QMAKE_SUBSYSTEM_SUFFIX@ via
		# qt_config.prf, which doesn't seem to trigger
		# for us. So we'll just try our luck.
		QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE
		QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@
		QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS
		QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@
		!isEmpty(QMAKE_LFLAGS_WINDOWS) {
			error("QMAKE_LFLAGS_WINDOWS is not empty. Please adjust the pri file.")
		}
		!isEmpty(QMAKE_LFLAGS_CONSOLE) {
			error("QMAKE_LFLAGS_CONSOLE is not empty. Please adjust the pri file.")
		}
		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01
			QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01
		}
		equals(QMAKE_TARGET.arch, x86_64) {
			QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,6.00
			QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,6.00
		}

		CONFIG(analyze) {
			QMAKE_CFLAGS_DEBUG *= /analyze
			QMAKE_CXXFLAGS_DEBUG *= /analyze
			QMAKE_CFLAGS_RELEASE *= /analyze
			QMAKE_CXXFLAGS_RELEASE *= /analyze
		}
		DEFINES *= RESTRICT=
		CONFIG(sse2) {
		      QMAKE_CFLAGS_RELEASE -= -arch:SSE
		      QMAKE_CFLAGS_DEBUG -= -arch:SSE
		      QMAKE_CFLAGS += -arch:SSE2
		}

		# Define the CONFIG options 'force-x86-toolchain' and
		# 'force-x86_64-toolchain'. These can be used to force
		# the target of a .pro file to be built for a specific
		# architecture, regardless of the actual architecture
		# used by the current build environment.
		FULL_MKSPEC_PATH = $$QMAKESPEC
		CURRENT_MKSPEC = $$basename(QMAKESPEC)

		CONFIG(force-x86-toolchain) {
			include(toolchain/$${CURRENT_MKSPEC}/x86-xp.toolchain)
		}

		CONFIG(force-x86_64-toolchain) {
			include(toolchain/$${CURRENT_MKSPEC}/x64.toolchain)
		}
	}

	CONFIG(symbols) {
		# Configure build to be able to properly debug release builds
		# (https://msdn.microsoft.com/en-us/library/fsk896zz.aspx).
		# This includes explicitely disabling /Oy to help debugging
		# (https://msdn.microsoft.com/en-us/library/2kxx5t2c.aspx).
		# Also set /Zo to enhance optimized debugging
		# (https://msdn.microsoft.com/en-us/library/dn785163.aspx?f=255&MSPPError=-2147217396).
		QMAKE_CFLAGS_RELEASE -= -Oy
		QMAKE_CXXFLAGS_RELEASE -= -Oy

		QMAKE_CFLAGS_RELEASE *= -GR -Zi -Zo -Oy-
		QMAKE_CXXFLAGS_RELEASE *= -GR -Zi -Zo -Oy-

		QMAKE_LFLAGS *= /DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO
	}

	CONFIG(vld) {
		CONFIG(debug, debug|release) {
			DEFINES *= USE_VLD
			INCLUDEPATH *= "$$VLD_PATH/include"
			QMAKE_LIBDIR *= "$$VLD_PATH/lib"
		}
	}
}

unix {
	DEFINES *= RESTRICT=__restrict__
	QMAKE_CFLAGS *= -Wfatal-errors -fvisibility=hidden
	QMAKE_CXXFLAGS *= -Wfatal-errors -fvisibility=hidden
	!CONFIG(quiet-build-log) {
		QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare
		QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare
	}

	CONFIG(opt-gcc) {
		QMAKE_CC = /opt/gcc/bin/gcc
		QMAKE_CXX = /opt/gcc/bin/g++
		QMAKE_LINK = /opt/gcc/bin/g++
	}

	CONFIG(optgen) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_LFLAGS *= -fprofile-generate
	}

	CONFIG(optimize) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
	}
}

unix:!macx {
	CONFIG(debug, debug|release) {
		QMAKE_CFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_CXXFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_LFLAGS = -Wl,--no-add-needed
	}

	DEFINES *= _FORTIFY_SOURCE=2
	QMAKE_LFLAGS *= -Wl,-z,relro -Wl,-z,now

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -g
		QMAKE_CXXFLAGS *= -g
	}
}

macx {
	SYSTEM_INCLUDES = $$(MUMBLE_PREFIX)/include $$(MUMBLE_PREFIX)/include/boost_1_54_0 $$[QT_INSTALL_HEADERS]
	QMAKE_LIBDIR *= $$(MUMBLE_PREFIX)/lib

	for(inc, $$list($$SYSTEM_INCLUDES)) {
		QMAKE_CFLAGS += -isystem $$inc
		QMAKE_CXXFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CXXFLAGS += -isystem $$inc
	}

	!CONFIG(universal) {
		CONFIG += no-pch

		# Qt 5.1 and greater want short-form OS X SDKs.
		isEqual(QT_MAJOR_VERSION, 5) {
			QMAKE_MAC_SDK = macosx
		} else {
			QMAKE_MAC_SDK = $$system(xcrun --sdk macosx --show-sdk-path 2>/dev/null)
			isEmpty(QMAKE_MAC_SDK) {
				QMAKE_MAC_SDK = $$system(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
				!exists($$QMAKE_MAC_SDK) {
					message("Unable to find usable OS X SDK")
					error("Aborting build")
				}
			}
		}

		QMAKE_CC = $$system(xcrun -find clang)
		QMAKE_CXX = $$system(xcrun -find clang++)
		QMAKE_LINK = $$system(xcrun -find clang++)
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
		QMAKE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.6
	} else {
		XCODE_PATH=$$system(xcode-select -print-path)
		CONFIG += x86 ppc no-cocoa
		QMAKE_MAC_SDK = $${XCODE_PATH}/SDKs/MacOSX10.5.sdk
		QMAKE_CC = $${XCODE_PATH}/usr/bin/gcc-4.2
		QMAKE_CXX = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_LINK = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
		QMAKE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		DEFINES += USE_MAC_UNIVERSAL
	}

	QMAKE_LFLAGS += -Wl,-dead_strip -framework Cocoa -framework Carbon

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -gfull -gdwarf-2
		QMAKE_CXXFLAGS *= -gfull -gdwarf-2
	}
}

CONFIG(clang-analyzer) {
	QMAKE_CC = $$(CC)
	QMAKE_CXX = $$(CXX)
}

CONFIG(no-pch) {
	CONFIG -= precompile_header
} else {
 	CONFIG *= precompile_header
}

CONFIG(debug, debug|release) {
	DEFINES *= SNAPSHOT_BUILD
}

include(qt.pri)

CONFIG *= warn_on

win32 {
	# Import dependency paths for windows
	include(winpaths_default.pri)

	INCLUDEPATH *= "$$BOOST_PATH/include" "$$BOOST_PATH/include/boost-1_49/"
	QMAKE_LIBDIR *= "$$OPENSSL_PATH/lib" "$$LIBSNDFILE_PATH/lib" "$$BOOST_PATH/lib"
	INCLUDEPATH *= "$$OPENSSL_PATH/include" "$$LIBSNDFILE_PATH/include"

	# Sanity check that DXSDK_DIR, LIB and INCLUDE are properly set up.
	#
	# On Windows/x86, we build using the VS2013 v120_xp toolchain, which targets
	# a slightly modified Win7 SDK that still allows building for Windows XP. In that
	# environment, we must use the "external" DirectX SDK (June 2010). This SDK is
	# specified via the SXSDK_DIR.
	#
	# On Windows/amd64, we build using the VS2013 v120 platform, and we target the
	# Windows 8.1 SDK. In this setup, we use the DirectX SDK included with the Windows
	# 8.1 SDK, but only to a point. The bundled SDK does not include all things that
	# we depend on for the overlay, such as d3dx{9,10,11}. To overcome this, we use
	# both SDKs: the one bundled with the Windows 8.1 SDK for most libraries, and the
	# external June 2010 variant for the things that are not in the Windows 8.1 SDK
	# variant of the DirectX SDK. This is the approach recommended by Microsoft:
	# http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx
	# (see step 5).
	#
	# Because of these things, the Windows build currently expects the build environment
	# to properly set up the LIB and INCLUDE environment variables, with correct ordering
	# of the Windows SDK and DirectX depending on the platform we're targetting.
	# It's tough to check these things with qmake, we'll have to do with a simple sanity
	# check for the presence of the variables.
	DXSDK_DIR_VAR=$$(DXSDK_DIR)
	INCLUDE_VAR=$$(INCLUDE)
	LIB_VAR=$$(LIB)
	isEmpty(DXSDK_DIR_VAR) {
		error("Missing DXSDK_DIR environment variable. Are you missing the DirectX SDK (June 2010)?")
	}
	isEmpty(LIB_VAR) {
		error("The LIB environment variable is not set. Are you not in a build environment?")
	}
	isEmpty(INCLUDE_VAR) {
		error("The INCLUDE environment variable is not set. Are you not in a build environment?")
	}

	CONFIG(intelcpp) {
		DEFINES *= USE_INTEL_IPP
		DEFINES *= RESTRICT=restrict
		DEFINES *= VAR_ARRAYS
		QMAKE_CC = icl
		QMAKE_CXX = icl
		QMAKE_LIB = xilib /nologo
		QMAKE_LINK = xilink
		QMAKE_CFLAGS *= -Qstd=c99 -Qrestrict -Qvc9
		QMAKE_CXXFLAGS *= -Qstd=c++0x -Qrestrict -Qvc9

		QMAKE_CFLAGS_LTCG =
		QMAKE_CXXFLAGS_LTCG =
		QMAKE_LFLAGS_LTCG =

		QMAKE_CFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CFLAGS_RELEASE -=-arch:SSE
		QMAKE_CFLAGS_RELEASE -= -GL

		QMAKE_CXXFLAGS_RELEASE *= -O3 -Ot -QxSSE2 -Qprec-div-
		QMAKE_CXXFLAGS_RELEASE -=-arch:SSE
		QMAKE_CXXFLAGS_RELEASE -= -GL

		QMAKE_CFLAGS_DEBUG *= -O2 -Ob0
		QMAKE_CXXFLAGS_DEBUG *= -O2 -Ob0

		CONFIG(optgen) {
			QMAKE_CFLAGS *= -Qprof-gen
			QMAKE_CXXFLAGS *= -Qprof-gen
		}

		CONFIG(optimize) {
			QMAKE_CFLAGS *= -Qprof-use
			QMAKE_CXXFLAGS *= -Qprof-use
		}
	} else {
		QMAKE_CFLAGS_RELEASE *= -Ox /fp:fast
		QMAKE_CXXFLAGS_RELEASE *= -Ox /fp:fast

		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_LFLAGS_RELEASE -= /SafeSEH
		}

		# MSVS 2012 and 2013's cl.exe will generate SSE2 code by default,
		# unless an explict arch is set.
		# For our non-64 x86 builds, our binaries should not contain any
		# SSE2 code, so override the default by using -arch:SSE.
		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_CFLAGS_RELEASE *= -arch:SSE
			QMAKE_CXXFLAGS_RELEASE *= -arch:SSE
		}

		# Qt 5.4 uses -Zc:strictStrings by default on MSVS 2013.
		# TextToSpeech_win.cpp uses sapi.h, which isn't compatible
		# with the strictStrings option due to bad conversions
		# in some of its functions's default parameters.
		QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
		QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
		QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
		QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings

		# Explicitly set the subsystem versions to
		# 5.01 (XP) for x86 and 6.00 (Vista) for x64.
		#
		# Qt expands the @QMAKE_SUBSYSTEM_SUFFIX@ via
		# qt_config.prf, which doesn't seem to trigger
		# for us. So we'll just try our luck.
		QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE
		QMAKE_LFLAGS_CONSOLE -= /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@
		QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS
		QMAKE_LFLAGS_WINDOWS -= /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@
		!isEmpty(QMAKE_LFLAGS_WINDOWS) {
			error("QMAKE_LFLAGS_WINDOWS is not empty. Please adjust the pri file.")
		}
		!isEmpty(QMAKE_LFLAGS_CONSOLE) {
			error("QMAKE_LFLAGS_CONSOLE is not empty. Please adjust the pri file.")
		}
		equals(QMAKE_TARGET.arch, x86) {
			QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,5.01
			QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,5.01
		}
		equals(QMAKE_TARGET.arch, x86_64) {
			QMAKE_LFLAGS_CONSOLE += /SUBSYSTEM:CONSOLE,6.00
			QMAKE_LFLAGS_WINDOWS += /SUBSYSTEM:WINDOWS,6.00
		}

		CONFIG(analyze) {
			QMAKE_CFLAGS_DEBUG *= /analyze
			QMAKE_CXXFLAGS_DEBUG *= /analyze
			QMAKE_CFLAGS_RELEASE *= /analyze
			QMAKE_CXXFLAGS_RELEASE *= /analyze
		}
		DEFINES *= RESTRICT=
		CONFIG(sse2) {
		      QMAKE_CFLAGS_RELEASE -= -arch:SSE
		      QMAKE_CFLAGS_DEBUG -= -arch:SSE
		      QMAKE_CFLAGS += -arch:SSE2
		}

		# Define the CONFIG options 'force-x86-toolchain' and
		# 'force-x86_64-toolchain'. These can be used to force
		# the target of a .pro file to be built for a specific
		# architecture, regardless of the actual architecture
		# used by the current build environment.
		FULL_MKSPEC_PATH = $$QMAKESPEC
		CURRENT_MKSPEC = $$basename(QMAKESPEC)

		CONFIG(force-x86-toolchain) {
			include(toolchain/$${CURRENT_MKSPEC}/x86-xp.toolchain)
		}

		CONFIG(force-x86_64-toolchain) {
			include(toolchain/$${CURRENT_MKSPEC}/x64.toolchain)
		}
	}

	CONFIG(symbols) {
		# Configure build to be able to properly debug release builds
		# (https://msdn.microsoft.com/en-us/library/fsk896zz.aspx).
		# This includes explicitely disabling /Oy to help debugging
		# (https://msdn.microsoft.com/en-us/library/2kxx5t2c.aspx).
		QMAKE_CFLAGS_RELEASE -= -Oy
		QMAKE_CXXFLAGS_RELEASE -= -Oy

		QMAKE_CFLAGS_RELEASE *= -GR -Zi -Oy-
		QMAKE_CXXFLAGS_RELEASE *= -GR -Zi -Oy-

		QMAKE_LFLAGS *= /DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO
	}

	CONFIG(vld) {
		CONFIG(debug, debug|release) {
			DEFINES *= USE_VLD
			INCLUDEPATH *= "$$VLD_PATH/include"
			QMAKE_LIBDIR *= "$$VLD_PATH/lib"
		}
	}
}

unix {
	DEFINES *= RESTRICT=__restrict__
	QMAKE_CFLAGS *= -Wfatal-errors -fvisibility=hidden
	QMAKE_CXXFLAGS *= -Wfatal-errors -fvisibility=hidden
	!CONFIG(quiet-build-log) {
		QMAKE_CFLAGS *= -Wshadow -Wconversion -Wsign-compare
		QMAKE_CXXFLAGS *= -Wshadow -Woverloaded-virtual -Wold-style-cast -Wconversion -Wsign-compare
	}

	CONFIG(opt-gcc) {
		QMAKE_CC = /opt/gcc/bin/gcc
		QMAKE_CXX = /opt/gcc/bin/g++
		QMAKE_LINK = /opt/gcc/bin/g++
	}

	CONFIG(optgen) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-generate
		QMAKE_LFLAGS *= -fprofile-generate
	}

	CONFIG(optimize) {
		QMAKE_CFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
		QMAKE_CXXFLAGS *= -O3 -march=native -ffast-math -ftree-vectorize -fprofile-use
	}
}

unix:!macx {
	CONFIG(debug, debug|release) {
		QMAKE_CFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_CXXFLAGS *= -fstack-protector -fPIE -pie
		QMAKE_LFLAGS = -Wl,--no-add-needed
	}

	DEFINES *= _FORTIFY_SOURCE=2
	QMAKE_LFLAGS *= -Wl,-z,relro -Wl,-z,now

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -g
		QMAKE_CXXFLAGS *= -g
	}
}

macx {
	SYSTEM_INCLUDES = $$(MUMBLE_PREFIX)/include $$(MUMBLE_PREFIX)/include/boost_1_54_0 $$[QT_INSTALL_HEADERS]
	QMAKE_LIBDIR *= $$(MUMBLE_PREFIX)/lib

	for(inc, $$list($$SYSTEM_INCLUDES)) {
		QMAKE_CFLAGS += -isystem $$inc
		QMAKE_CXXFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CFLAGS += -isystem $$inc
		QMAKE_OBJECTIVE_CXXFLAGS += -isystem $$inc
	}

	!CONFIG(universal) {
		CONFIG += no-pch

		# Qt 5.1 and greater want short-form OS X SDKs.
		isEqual(QT_MAJOR_VERSION, 5) {
			QMAKE_MAC_SDK = macosx
		} else {
			QMAKE_MAC_SDK = $$system(xcrun --sdk macosx --show-sdk-path 2>/dev/null)
			isEmpty(QMAKE_MAC_SDK) {
				QMAKE_MAC_SDK = $$system(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
				!exists($$QMAKE_MAC_SDK) {
					message("Unable to find usable OS X SDK")
					error("Aborting build")
				}
			}
		}

		QMAKE_CC = $$system(xcrun -find clang)
		QMAKE_CXX = $$system(xcrun -find clang++)
		QMAKE_LINK = $$system(xcrun -find clang++)
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
		QMAKE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.6
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.6
	} else {
		XCODE_PATH=$$system(xcode-select -print-path)
		CONFIG += x86 ppc no-cocoa
		QMAKE_MAC_SDK = $${XCODE_PATH}/SDKs/MacOSX10.5.sdk
		QMAKE_CC = $${XCODE_PATH}/usr/bin/gcc-4.2
		QMAKE_CXX = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_LINK = $${XCODE_PATH}/usr/bin/g++-4.2
		QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
		QMAKE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		QMAKE_OBJECTIVE_CXXFLAGS += -mmacosx-version-min=10.4 -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
		DEFINES += USE_MAC_UNIVERSAL
	}

	QMAKE_LFLAGS += -Wl,-dead_strip -framework Cocoa -framework Carbon

	CONFIG(symbols) {
		QMAKE_CFLAGS *= -gfull -gdwarf-2
		QMAKE_CXXFLAGS *= -gfull -gdwarf-2
	}
}

CONFIG(clang-analyzer) {
	QMAKE_CC = $$(CC)
	QMAKE_CXX = $$(CXX)
}

CONFIG(no-pch) {
	CONFIG -= precompile_header
} else {
 	CONFIG *= precompile_header
}

CONFIG(debug, debug|release) {
	DEFINES *= SNAPSHOT_BUILD
}


C++: Minor cleanup in tools project

C++: Minor cleanup in tools project

Change-Id: I7506b30a1f6ac064511b047dfe5b90814e6d5212
Reviewed-by: Nikolai Kosjar <9571db158ca61a0d070db010803474231fa0cbab@theqtcompany.com>

QTC_LIB_DEPENDS += cplusplus

include(../../../qtcreator.pri)
include(../../rpath.pri)

DESTDIR = $$IDE_BIN_PATH

QT = core gui
TEMPLATE = app

osx:CONFIG -= app_bundle
CONFIG += console

QTC_LIB_DEPENDS += cplusplus

include(../../../qtcreator.pri)
include(../../rpath.pri)

DESTDIR = $$IDE_BIN_PATH

QT = core gui
TEMPLATE = app

osx:CONFIG -= app_bundle
win32:CONFIG += console
win32:LIBS += -luser32 -lshell32


Remove warning about no dialect

Remove warning about no dialect

#
# [REQUIRED] Add support for <inttypes.h> to Windows.
#
WindowsBuild {
    INCLUDEPATH += libs/lib/msinttypes
}

#
# [REQUIRED] Add support for the MAVLink communications protocol.
# Some logic is involved here in selecting the proper dialect for
# the selected autopilot system.
#
# If the user config file exists, it will be included. If this file
# specifies the MAVLINK_CONF variable with a MAVLink dialect, support
# for it will be compiled in to QGC. It will also create a
# QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use within the actual code.
#
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v1.0
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
DEFINES += MAVLINK_NO_DATA

# First we select the dialect, checking for valid user selection
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
    message($$sprintf("Using MAVLink dialect '%1' specified at the command line.", $$MAVLINK_CONF))
}
# Otherwise they can specify MAVLINK_CONF within user_config.pri
else:exists(user_config.pri):infile(user_config.pri, MAVLINK_CONF) {
    MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
    !isEmpty(MAVLINK_CONF) {
        message($$sprintf("Using MAVLink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
    }
}

# Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH

exists($$MAVLINKPATH/common) {
    !isEmpty(MAVLINK_CONF) {
        count(MAVLINK_CONF, 1) {
            exists($$MAVLINKPATH/$$MAVLINK_CONF) {
                INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
                DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
            } else {
                error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
            }
        } else {
            error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
        }
    } else {
        INCLUDEPATH += $$MAVLINKPATH/common
    }
} else {
    error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
}

#
# [REQUIRED] EIGEN matrix library
# NOMINMAX constant required to make internal min/max work.
INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX

#
# [REQUIRED] QWT plotting library dependency. Provides plotting capabilities.
#
!MobileBuild {
include(libs/qwt.pri)
DEPENDPATH += libs/qwt
INCLUDEPATH += libs/qwt
}

#
# [OPTIONAL] XBee wireless support. This is not necessary for basic serial/UART communications.
# It's only required for speaking directly to the Xbee using their proprietary API.
# Unsupported on Mac.
# Installation on Windows is unnecessary, as we just link to our included .dlls directly.
# Installing on Linux involves running `make;sudo make install` in `libs/thirdParty/libxbee`
# Uninstalling from Linux can be done with `sudo make uninstall`.
#
XBEE_DEPENDENT_HEADERS += \
    src/comm/XbeeLinkInterface.h \
    src/comm/XbeeLink.h \
    src/comm/HexSpinBox.h \
    src/ui/XbeeConfigurationWindow.h \
    src/comm/CallConv.h
XBEE_DEPENDENT_SOURCES += \
    src/comm/XbeeLink.cpp \
    src/comm/HexSpinBox.cpp \
    src/ui/XbeeConfigurationWindow.cpp
XBEE_DEFINES = QGC_XBEE_ENABLED

contains(DEFINES, DISABLE_XBEE) {
    message("Skipping support for native XBee API (manual override from command line)")
    DEFINES -= DISABLE_XBEE
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_XBEE) {
    message("Skipping support for native XBee API (manual override from user_config.pri)")
} else:LinuxBuild {
        linux-g++-64 {
            message("Skipping support for XBee API (64-bit Linux builds not supported)")
        } else:exists(/usr/include/xbee.h) {
        message("Including support for XBee API")

        HEADERS += $$XBEE_DEPENDENT_HEADERS
        SOURCES += $$XBEE_DEPENDENT_SOURCES
        DEFINES += $$XBEE_DEFINES
        LIBS += -L/usr/lib -lxbee
    } else {
        warning("Skipping support for XBee API (missing libraries, see README)")
    }
} else:WindowsBuild {
    message("Including support for XBee API")
    HEADERS += $$XBEE_DEPENDENT_HEADERS
    SOURCES += $$XBEE_DEPENDENT_SOURCES
    DEFINES += $$XBEE_DEFINES
    INCLUDEPATH += libs/thirdParty/libxbee
        LIBS += -l$$BASEDIR/libs/thirdParty/libxbee/lib/libxbee
} else {
    message("Skipping support for XBee API (unsupported platform)")
}

#
# [OPTIONAL] Magellan 3DxWare library. Provides support for 3DConnexion's 3D mice.
#
contains(DEFINES, DISABLE_3DMOUSE) {
    message("Skipping support for 3DConnexion mice (manual override from command line)")
    DEFINES -= DISABLE_3DMOUSE
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_3DMOUSE) {
    message("Skipping support for 3DConnexion mice (manual override from user_config.pri)")
} else:LinuxBuild {
    exists(/usr/local/lib/libxdrvlib.so) {
        message("Including support for 3DConnexion mice")

                DEFINES += \
        QGC_MOUSE_ENABLED_LINUX \
                ParameterCheck
                # Hack: Has to be defined for magellan usage

        HEADERS += src/input/Mouse6dofInput.h
        SOURCES += src/input/Mouse6dofInput.cpp
        LIBS += -L/usr/local/lib/ -lxdrvlib
    } else {
        warning("Skipping support for 3DConnexion mice (missing libraries, see README)")
    }
} else:WindowsBuild {
    message("Including support for 3DConnexion mice")

    DEFINES += QGC_MOUSE_ENABLED_WIN

    INCLUDEPATH += libs/thirdParty/3DMouse/win

    HEADERS += \
        libs/thirdParty/3DMouse/win/I3dMouseParams.h \
        libs/thirdParty/3DMouse/win/MouseParameters.h \
        libs/thirdParty/3DMouse/win/Mouse3DInput.h \
        src/input/Mouse6dofInput.h

    SOURCES += \
        libs/thirdParty/3DMouse/win/MouseParameters.cpp \
        libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
        src/input/Mouse6dofInput.cpp
} else {
    message("Skipping support for 3DConnexion mice (unsupported platform)")
}

#
# [OPTIONAL] Opal RT-LAB Library. Provides integration with Opal-RT's RT-LAB simulator.
#
contains(DEFINES, DISABLE_RTLAB) {
    message("Skipping support for RT-LAB (manual override from command line)")
    DEFINES -= DISABLE_RTLAB
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_RTLAB) {
    message("Skipping support for RT-LAB (manual override from user_config.pri)")
} else:WindowsBuild {
    exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
        message("Including support for RT-LAB")

        DEFINES += QGC_RTLAB_ENABLED

        INCLUDEPATH +=
            src/lib/opalrt
            libs/lib/opal/include \

        FORMS += src/ui/OpalLinkSettings.ui

        HEADERS += \
            src/comm/OpalRT.h \
            src/comm/OpalLink.h \
            src/comm/Parameter.h \
            src/comm/QGCParamID.h \
            src/comm/ParameterList.h \
            src/ui/OpalLinkConfigurationWindow.h

        SOURCES += \
            src/comm/OpalRT.cc \
            src/comm/OpalLink.cc \
            src/comm/Parameter.cc \
            src/comm/QGCParamID.cc \
            src/comm/ParameterList.cc \
            src/ui/OpalLinkConfigurationWindow.cc

        LIBS += \
            -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
            -lOpalApi
    } else {
        warning("Skipping support for RT-LAB (missing libraries, see README)")
    }
} else {
    message("Skipping support for RT-LAB (unsupported platform)")
}

#
# [REQUIRED] SDL dependency. Provides joystick/gamepad support.
# The SDL is packaged with QGC for the Mac and Windows. Linux support requires installing the SDL
# library (development libraries and static binaries).
#
MacBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/Frameworks/SDL.framework/Headers

    LIBS += \
        -F$$BASEDIR/libs/lib/Frameworks \
        -framework SDL
} else:LinuxBuild {
    PKGCONFIG = sdl
} else:WindowsBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/sdl/msvc/include \

    LIBS += \
        -L$$BASEDIR/libs/lib/sdl/msvc/lib \
        -lSDLmain \
        -lSDL
}

##
# [OPTIONAL] Speech synthesis library support.
# Can be forcibly disabled by adding a `DEFINES+=DISABLE_SPEECH` argument to qmake.
# Linux support requires the eSpeak speech synthesizer (espeak).
# Mac support is provided in Snow Leopard and newer (10.6+)
# Windows is supported as of Windows 7
#
contains (DEFINES, DISABLE_SPEECH) {
    message("Skipping support for speech output (manual override from command line)")
    DEFINES -= DISABLE_SPEECH
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_SPEECH) {
    message("Skipping support for speech output (manual override from user_config.pri)")
} else:LinuxBuild {
    exists(/usr/include/espeak) | exists(/usr/local/include/espeak) {
        message("Including support for speech output")
        DEFINES += QGC_SPEECH_ENABLED
        LIBS += \
        -lespeak
    } else {
        warning("Skipping support for speech output (missing libraries, see README)")
    }
}
# Mac support is built into OS 10.6+.
else:MacBuild|iOSBuild {
    message("Including support for speech output")
    DEFINES += QGC_SPEECH_ENABLED
}
# Windows supports speech through native API.
else:WindowsBuild {
    message("Including support for speech output")
    DEFINES += QGC_SPEECH_ENABLED
    LIBS    += -lOle32
}
# Android supports speech through native (Java) API.
else:AndroidBuild {
    message("Including support for speech output")
    DEFINES += QGC_SPEECH_ENABLED
}

#
# [OPTIONAL] Zeroconf for UDP links
#
contains (DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from command line)")
    DEFINES -= DISABLE_ZEROCONF
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from user_config.pri)")
# Mac support is built into OS
} else:MacBuild|iOSBuild {
    message("Including support for Zeroconf (Bonjour)")
    DEFINES += QGC_ZEROCONF_ENABLED
} else {
    message("Skipping support for Zeroconf (unsupported platform)")
}

#
# [REQUIRED] Add support for <inttypes.h> to Windows.
#
WindowsBuild {
    INCLUDEPATH += libs/lib/msinttypes
}

#
# [REQUIRED] Add support for the MAVLink communications protocol.
# Some logic is involved here in selecting the proper dialect for
# the selected autopilot system.
#
# If the user config file exists, it will be included. If this file
# specifies the MAVLINK_CONF variable with a MAVLink dialect, support
# for it will be compiled in to QGC. It will also create a
# QGC_USE_{AUTOPILOT_NAME}_MESSAGES macro for use within the actual code.
#
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v1.0
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
DEFINES += MAVLINK_NO_DATA

# First we select the dialect, checking for valid user selection
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
    message($$sprintf("Using MAVLink dialect '%1' specified at the command line.", $$MAVLINK_CONF))
}
# Otherwise they can specify MAVLINK_CONF within user_config.pri
else:exists(user_config.pri):infile(user_config.pri, MAVLINK_CONF) {
    MAVLINK_CONF = $$fromfile(user_config.pri, MAVLINK_CONF)
    !isEmpty(MAVLINK_CONF) {
        message($$sprintf("Using MAVLink dialect '%1' specified in user_config.pri", $$MAVLINK_CONF))
    }
}

# Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH

exists($$MAVLINKPATH/common) {
    !isEmpty(MAVLINK_CONF) {
        count(MAVLINK_CONF, 1) {
            exists($$MAVLINKPATH/$$MAVLINK_CONF) {
                INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
                DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
            } else {
                error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
            }
        } else {
            error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
        }
    } else {
        warning("No MAVLink dialect specified, only common messages supported.")
        INCLUDEPATH += $$MAVLINKPATH/common
    }
} else {
    error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
}

#
# [REQUIRED] EIGEN matrix library
# NOMINMAX constant required to make internal min/max work.
INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX

#
# [REQUIRED] QWT plotting library dependency. Provides plotting capabilities.
#
!MobileBuild {
include(libs/qwt.pri)
DEPENDPATH += libs/qwt
INCLUDEPATH += libs/qwt
}

#
# [OPTIONAL] XBee wireless support. This is not necessary for basic serial/UART communications.
# It's only required for speaking directly to the Xbee using their proprietary API.
# Unsupported on Mac.
# Installation on Windows is unnecessary, as we just link to our included .dlls directly.
# Installing on Linux involves running `make;sudo make install` in `libs/thirdParty/libxbee`
# Uninstalling from Linux can be done with `sudo make uninstall`.
#
XBEE_DEPENDENT_HEADERS += \
    src/comm/XbeeLinkInterface.h \
    src/comm/XbeeLink.h \
    src/comm/HexSpinBox.h \
    src/ui/XbeeConfigurationWindow.h \
    src/comm/CallConv.h
XBEE_DEPENDENT_SOURCES += \
    src/comm/XbeeLink.cpp \
    src/comm/HexSpinBox.cpp \
    src/ui/XbeeConfigurationWindow.cpp
XBEE_DEFINES = QGC_XBEE_ENABLED

contains(DEFINES, DISABLE_XBEE) {
    message("Skipping support for native XBee API (manual override from command line)")
    DEFINES -= DISABLE_XBEE
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_XBEE) {
    message("Skipping support for native XBee API (manual override from user_config.pri)")
} else:LinuxBuild {
        linux-g++-64 {
            message("Skipping support for XBee API (64-bit Linux builds not supported)")
        } else:exists(/usr/include/xbee.h) {
        message("Including support for XBee API")

        HEADERS += $$XBEE_DEPENDENT_HEADERS
        SOURCES += $$XBEE_DEPENDENT_SOURCES
        DEFINES += $$XBEE_DEFINES
        LIBS += -L/usr/lib -lxbee
    } else {
        warning("Skipping support for XBee API (missing libraries, see README)")
    }
} else:WindowsBuild {
    message("Including support for XBee API")
    HEADERS += $$XBEE_DEPENDENT_HEADERS
    SOURCES += $$XBEE_DEPENDENT_SOURCES
    DEFINES += $$XBEE_DEFINES
    INCLUDEPATH += libs/thirdParty/libxbee
        LIBS += -l$$BASEDIR/libs/thirdParty/libxbee/lib/libxbee
} else {
    message("Skipping support for XBee API (unsupported platform)")
}

#
# [OPTIONAL] Magellan 3DxWare library. Provides support for 3DConnexion's 3D mice.
#
contains(DEFINES, DISABLE_3DMOUSE) {
    message("Skipping support for 3DConnexion mice (manual override from command line)")
    DEFINES -= DISABLE_3DMOUSE
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_3DMOUSE) {
    message("Skipping support for 3DConnexion mice (manual override from user_config.pri)")
} else:LinuxBuild {
    exists(/usr/local/lib/libxdrvlib.so) {
        message("Including support for 3DConnexion mice")

                DEFINES += \
        QGC_MOUSE_ENABLED_LINUX \
                ParameterCheck
                # Hack: Has to be defined for magellan usage

        HEADERS += src/input/Mouse6dofInput.h
        SOURCES += src/input/Mouse6dofInput.cpp
        LIBS += -L/usr/local/lib/ -lxdrvlib
    } else {
        warning("Skipping support for 3DConnexion mice (missing libraries, see README)")
    }
} else:WindowsBuild {
    message("Including support for 3DConnexion mice")

    DEFINES += QGC_MOUSE_ENABLED_WIN

    INCLUDEPATH += libs/thirdParty/3DMouse/win

    HEADERS += \
        libs/thirdParty/3DMouse/win/I3dMouseParams.h \
        libs/thirdParty/3DMouse/win/MouseParameters.h \
        libs/thirdParty/3DMouse/win/Mouse3DInput.h \
        src/input/Mouse6dofInput.h

    SOURCES += \
        libs/thirdParty/3DMouse/win/MouseParameters.cpp \
        libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
        src/input/Mouse6dofInput.cpp
} else {
    message("Skipping support for 3DConnexion mice (unsupported platform)")
}

#
# [OPTIONAL] Opal RT-LAB Library. Provides integration with Opal-RT's RT-LAB simulator.
#
contains(DEFINES, DISABLE_RTLAB) {
    message("Skipping support for RT-LAB (manual override from command line)")
    DEFINES -= DISABLE_RTLAB
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_RTLAB) {
    message("Skipping support for RT-LAB (manual override from user_config.pri)")
} else:WindowsBuild {
    exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
        message("Including support for RT-LAB")

        DEFINES += QGC_RTLAB_ENABLED

        INCLUDEPATH +=
            src/lib/opalrt
            libs/lib/opal/include \

        FORMS += src/ui/OpalLinkSettings.ui

        HEADERS += \
            src/comm/OpalRT.h \
            src/comm/OpalLink.h \
            src/comm/Parameter.h \
            src/comm/QGCParamID.h \
            src/comm/ParameterList.h \
            src/ui/OpalLinkConfigurationWindow.h

        SOURCES += \
            src/comm/OpalRT.cc \
            src/comm/OpalLink.cc \
            src/comm/Parameter.cc \
            src/comm/QGCParamID.cc \
            src/comm/ParameterList.cc \
            src/ui/OpalLinkConfigurationWindow.cc

        LIBS += \
            -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
            -lOpalApi
    } else {
        warning("Skipping support for RT-LAB (missing libraries, see README)")
    }
} else {
    message("Skipping support for RT-LAB (unsupported platform)")
}

#
# [REQUIRED] SDL dependency. Provides joystick/gamepad support.
# The SDL is packaged with QGC for the Mac and Windows. Linux support requires installing the SDL
# library (development libraries and static binaries).
#
MacBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/Frameworks/SDL.framework/Headers

    LIBS += \
        -F$$BASEDIR/libs/lib/Frameworks \
        -framework SDL
} else:LinuxBuild {
    PKGCONFIG = sdl
} else:WindowsBuild {
    INCLUDEPATH += \
        $$BASEDIR/libs/lib/sdl/msvc/include \

    LIBS += \
        -L$$BASEDIR/libs/lib/sdl/msvc/lib \
        -lSDLmain \
        -lSDL
}

##
# [OPTIONAL] Speech synthesis library support.
# Can be forcibly disabled by adding a `DEFINES+=DISABLE_SPEECH` argument to qmake.
# Linux support requires the eSpeak speech synthesizer (espeak).
# Mac support is provided in Snow Leopard and newer (10.6+)
# Windows is supported as of Windows 7
#
contains (DEFINES, DISABLE_SPEECH) {
    message("Skipping support for speech output (manual override from command line)")
    DEFINES -= DISABLE_SPEECH
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_SPEECH) {
    message("Skipping support for speech output (manual override from user_config.pri)")
} else:LinuxBuild {
    exists(/usr/include/espeak) | exists(/usr/local/include/espeak) {
        message("Including support for speech output")
        DEFINES += QGC_SPEECH_ENABLED
        LIBS += \
        -lespeak
    } else {
        warning("Skipping support for speech output (missing libraries, see README)")
    }
}
# Mac support is built into OS 10.6+.
else:MacBuild|iOSBuild {
    message("Including support for speech output")
    DEFINES += QGC_SPEECH_ENABLED
}
# Windows supports speech through native API.
else:WindowsBuild {
    message("Including support for speech output")
    DEFINES += QGC_SPEECH_ENABLED
    LIBS    += -lOle32
}
# Android supports speech through native (Java) API.
else:AndroidBuild {
    message("Including support for speech output")
    DEFINES += QGC_SPEECH_ENABLED
}

#
# [OPTIONAL] Zeroconf for UDP links
#
contains (DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from command line)")
    DEFINES -= DISABLE_ZEROCONF
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_ZEROCONF) {
    message("Skipping support for Zeroconf (manual override from user_config.pri)")
# Mac support is built into OS
} else:MacBuild|iOSBuild {
    message("Including support for Zeroconf (Bonjour)")
    DEFINES += QGC_ZEROCONF_ENABLED
} else {
    message("Skipping support for Zeroconf (unsupported platform)")
}


Qt5 migration, changed testlib config

Qt5 migration, changed testlib config

#
# General settings for unit test applications
#

TEMPLATE = app

# use Qt test, console, script.
CONFIG += console
CONFIG -= app_bundle
QT -= gui
QT += script
QT += testlib

CONFIG += debug_and_release

INCLUDEPATH += .

DEPENDPATH += .

include(../../src/common.pri)

# output dirs
CONFIG(debug, debug|release) {
  DESTDIR = ../../build/debug
} else {
  DESTDIR = ../../build/release
}

#
# General settings for unit test applications
#

TEMPLATE = app

# use Qt test, console, script.
CONFIG += qtestlib
CONFIG += console
CONFIG -= app_bundle
QT -= gui
QT += script

CONFIG += debug_and_release

INCLUDEPATH += .

DEPENDPATH += .

include(../../src/common.pri)

# output dirs
CONFIG(debug, debug|release) {
  DESTDIR = ../../build/debug
} else {
  DESTDIR = ../../build/release
}


We are working towards 0.15.0.0!

We are working towards 0.15.0.0!

#Used for common JASP qmake build settings

#Jasp-R-Interface
JASP_R_INTERFACE_TARGET = R-Interface

JASP_R_INTERFACE_MAJOR_VERSION =  10  # Interface changes or whenever you feel majorlike
JASP_R_INTERFACE_MINOR_VERSION =  8   # Code changes

JASP_R_INTERFACE_NAME = $$JASP_R_INTERFACE_TARGET$$JASP_R_INTERFACE_MAJOR_VERSION'.'$$JASP_R_INTERFACE_MINOR_VERSION

#R settings
CURRENT_R_VERSION = 3.6
DEFINES += "CURRENT_R_VERSION=\"$$CURRENT_R_VERSION\""

#JASP Version
JASP_VERSION_MAJOR      = 0
JASP_VERSION_MINOR      = 15
JASP_VERSION_REVISION   = 0
JASP_VERSION_BUILD      = 0 #Should be ignored because the code handling it is buggy as hell (aka https://www.youtube.com/watch?v=otCpCn0l4Wo )

DEFINES +=    "JASP_VERSION_MAJOR=$$JASP_VERSION_MAJOR"
DEFINES +=    "JASP_VERSION_MINOR=$$JASP_VERSION_MINOR"
DEFINES +=    "JASP_VERSION_BUILD=$$JASP_VERSION_BUILD"
DEFINES += "JASP_VERSION_REVISION=$$JASP_VERSION_REVISION"

GIT_EXEC=git #Unix knows where to find things
windows { #Windows is not so sure
	_GIT_LOCATION = $$(GIT_LOCATION)
	isEmpty(_GIT_LOCATION): _GIT_LOCATION="C:\Program Files\Git" #default assumption, if you want to change it then set the GIT_LOCATION environment variable (For instance under Projects->Run)

	GIT_EXEC = $${_GIT_LOCATION}\bin\git.exe

        DEFINES += WIN32_LEAN_AND_MEAN
}

GIT_BRANCH=$$system(\"$$GIT_EXEC\" rev-parse --abbrev-ref HEAD)
GIT_COMMIT=$$system(\"$$GIT_EXEC\" rev-parse --verify HEAD)

DEFINES += GIT_CURRENT_BRANCH=\"$$GIT_BRANCH\"
DEFINES += GIT_CURRENT_COMMIT=\"$$GIT_COMMIT\"

JASP_REQUIRED_FILES = $$PWD/../jasp-required-files

#message(using JASP_REQUIRED_FILES of $$JASP_REQUIRED_FILES)

INCLUDEPATH += $$JASP_REQUIRED_FILES/boost_1_71_0/

BUILDING_JASP_ENGINE=false
DEFINES += PRINT_ENGINE_MESSAGES

#macx | windows | exists(/app/lib/*) {
#	message(using libjson static)
  DEFINES += JASP_LIBJSON_STATIC # lets just always use libjson-static, they keep moving the include files...
#} else {
#    linux {
#        message(using libjson from distro and pkgconfig)
#        QT_CONFIG -= no-pkg-config
#        CONFIG += link_pkgconfig
#        PKGCONFIG += jsoncpp
#        LIBS += -ljsoncpp
#
#        CONFIG(debug, debug|release) {  DEFINES+=JASP_DEBUG }
#    }
#}

exists(/app/lib/*) {
  linux:  DEFINES += FLATPAK_USED
} else {
  linux:	CONFIG(debug, debug|release)  {
    DEFINES += JASP_DEBUG
    DEFINES += LINUX_NOT_FLATPAK
  }
}
macx | windows { CONFIG(debug, debug|release) {  DEFINES += JASP_DEBUG } }

windows {
	#message(QT_ARCH $$QT_ARCH)
	contains(QT_ARCH, i386) {
		ARCH = i386
		BOOST_ARCH = x32
	} else {
		ARCH = x64
		BOOST_ARCH = x64
	}

        CONFIG(ReleaseBuild)    { BOOST_POSTFIX = -vc142-mt-$${BOOST_ARCH}-1_71 }
        CONFIG(DebugBuild)      { BOOST_POSTFIX = -vc142-mt-gd-$${BOOST_ARCH}-1_71 }

	QMAKE_CXXFLAGS	+= -DBOOST_USE_WINDOWS_H -DNOMINMAX -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
}

unix: QMAKE_CXXFLAGS += -Werror=return-type

#want to use JASPTIMER_* ? set JASPTIMER_USED to true, run qmake and rebuild the objects that use these macros (or just rebuild everything to be sure)
JASPTIMER_USED = false

$$JASPTIMER_USED {
    DEFINES += PROFILE_JASP
}

exists(/app/lib/*)	{
  INSTALLPATH = /app/bin
 } else	{
  INSTALLPATH = /usr/bin
}

DEFINES += QT_NO_FOREACH #Come on Qt we can just use the nice new ranged for from c++11 and higher, we dont need your help!

macx {
  QMAKE_CXXFLAGS_WARN_ON  += -Wno-unused-parameter -Wno-unused-local-typedef
  QMAKE_CXXFLAGS          += -Wno-c++11-extensions -Wno-c++11-long-long -Wno-c++11-extra-semi -stdlib=libc++ -Wno-deprecated-declarations

  CONFIG(debug): QMAKE_CXXFLAGS +=  -fstandalone-debug
}

#uncomment the following line to enable automatic encoding and decoding of columnNames. Be sure to recompile all necessary objects
DEFINES += JASP_COLUMN_ENCODE_ALL

#Used for common JASP qmake build settings

#Jasp-R-Interface
JASP_R_INTERFACE_TARGET = R-Interface

JASP_R_INTERFACE_MAJOR_VERSION =  10  # Interface changes or whenever you feel majorlike
JASP_R_INTERFACE_MINOR_VERSION =  8   # Code changes

JASP_R_INTERFACE_NAME = $$JASP_R_INTERFACE_TARGET$$JASP_R_INTERFACE_MAJOR_VERSION'.'$$JASP_R_INTERFACE_MINOR_VERSION

#R settings
CURRENT_R_VERSION = 3.6
DEFINES += "CURRENT_R_VERSION=\"$$CURRENT_R_VERSION\""

#JASP Version
JASP_VERSION_MAJOR      = 0
JASP_VERSION_MINOR      = 15
JASP_VERSION_REVISION   = 1
JASP_VERSION_BUILD      = 0 #Should be ignored because the code handling it is buggy as hell (aka https://www.youtube.com/watch?v=otCpCn0l4Wo )

DEFINES +=    "JASP_VERSION_MAJOR=$$JASP_VERSION_MAJOR"
DEFINES +=    "JASP_VERSION_MINOR=$$JASP_VERSION_MINOR"
DEFINES +=    "JASP_VERSION_BUILD=$$JASP_VERSION_BUILD"
DEFINES += "JASP_VERSION_REVISION=$$JASP_VERSION_REVISION"

GIT_EXEC=git #Unix knows where to find things
windows { #Windows is not so sure
	_GIT_LOCATION = $$(GIT_LOCATION)
	isEmpty(_GIT_LOCATION): _GIT_LOCATION="C:\Program Files\Git" #default assumption, if you want to change it then set the GIT_LOCATION environment variable (For instance under Projects->Run)

	GIT_EXEC = $${_GIT_LOCATION}\bin\git.exe

        DEFINES += WIN32_LEAN_AND_MEAN
}

GIT_BRANCH=$$system(\"$$GIT_EXEC\" rev-parse --abbrev-ref HEAD)
GIT_COMMIT=$$system(\"$$GIT_EXEC\" rev-parse --verify HEAD)

DEFINES += GIT_CURRENT_BRANCH=\"$$GIT_BRANCH\"
DEFINES += GIT_CURRENT_COMMIT=\"$$GIT_COMMIT\"

JASP_REQUIRED_FILES = $$PWD/../jasp-required-files

#message(using JASP_REQUIRED_FILES of $$JASP_REQUIRED_FILES)

INCLUDEPATH += $$JASP_REQUIRED_FILES/boost_1_71_0/

BUILDING_JASP_ENGINE=false
DEFINES += PRINT_ENGINE_MESSAGES

#macx | windows | exists(/app/lib/*) {
#	message(using libjson static)
  DEFINES += JASP_LIBJSON_STATIC # lets just always use libjson-static, they keep moving the include files...
#} else {
#    linux {
#        message(using libjson from distro and pkgconfig)
#        QT_CONFIG -= no-pkg-config
#        CONFIG += link_pkgconfig
#        PKGCONFIG += jsoncpp
#        LIBS += -ljsoncpp
#
#        CONFIG(debug, debug|release) {  DEFINES+=JASP_DEBUG }
#    }
#}

exists(/app/lib/*) {
  linux:  DEFINES += FLATPAK_USED
} else {
  linux:	CONFIG(debug, debug|release)  {
    DEFINES += JASP_DEBUG
    DEFINES += LINUX_NOT_FLATPAK
  }
}
macx | windows { CONFIG(debug, debug|release) {  DEFINES += JASP_DEBUG } }

windows {
	#message(QT_ARCH $$QT_ARCH)
	contains(QT_ARCH, i386) {
		ARCH = i386
		BOOST_ARCH = x32
	} else {
		ARCH = x64
		BOOST_ARCH = x64
	}

        CONFIG(ReleaseBuild)    { BOOST_POSTFIX = -vc142-mt-$${BOOST_ARCH}-1_71 }
        CONFIG(DebugBuild)      { BOOST_POSTFIX = -vc142-mt-gd-$${BOOST_ARCH}-1_71 }

	QMAKE_CXXFLAGS	+= -DBOOST_USE_WINDOWS_H -DNOMINMAX -DBOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
}

unix: QMAKE_CXXFLAGS += -Werror=return-type

#want to use JASPTIMER_* ? set JASPTIMER_USED to true, run qmake and rebuild the objects that use these macros (or just rebuild everything to be sure)
JASPTIMER_USED = false

$$JASPTIMER_USED {
    DEFINES += PROFILE_JASP
}

exists(/app/lib/*)	{
  INSTALLPATH = /app/bin
 } else	{
  INSTALLPATH = /usr/bin
}

DEFINES += QT_NO_FOREACH #Come on Qt we can just use the nice new ranged for from c++11 and higher, we dont need your help!

macx {
  QMAKE_CXXFLAGS_WARN_ON  += -Wno-unused-parameter -Wno-unused-local-typedef
  QMAKE_CXXFLAGS          += -Wno-c++11-extensions -Wno-c++11-long-long -Wno-c++11-extra-semi -stdlib=libc++ -Wno-deprecated-declarations

  CONFIG(debug): QMAKE_CXXFLAGS +=  -fstandalone-debug
}

#uncomment the following line to enable automatic encoding and decoding of columnNames. Be sure to recompile all necessary objects
DEFINES += JASP_COLUMN_ENCODE_ALL


If  USE_PRECOMPILED_LIB is enabled, check to see if the library exists. If it does use the precompiled one, otherwise compile OF

#openFrameworks path.
CONFIG += USE_PRECOMPILED_LIB
OF = #OF_PATH#
win32:CONFIG(release, debug|release): {
    QMAKE_LFLAGS += /NODEFAULTLIB:PocoFoundationmd.lib
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMT
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBC.LIBS
    QMAKE_LFLAGS += /NODEFAULTLIB:atlthunk.lib

    DEFINES += "WIN32"
    DEFINES += "NDEBUG"
    DEFINES += "_CONSOLE"
    DEFINES += "POCO_STATIC"
    DEFINES += "CAIRO_WIN32_STATIC_BUILD"
    DEFINES += "DISABLE_SOME_FLOATING_POINT"
    DEFINES += "_UNICODE"
    DEFINES += "UNICODE"
}
else:win32:CONFIG(debug, debug|release): {
    QMAKE_LFLAGS += /NODEFAULTLIB:PocoFoundationmdd.lib
    QMAKE_LFLAGS += /NODEFAULTLIB:atlthunk.lib
    QMAKE_LFLAGS += /NODEFAULTLIB:msvcrt
    QMAKE_LFLAGS += /NODEFAULTLIB:libcmt
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBC
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMTD

    DEFINES += "WIN32"
    DEFINES += "_DEBUG"
    DEFINES += "_CONSOLE"
    DEFINES += "POCO_STATIC"
    DEFINES += "CAIRO_WIN32_STATIC_BUILD"
    DEFINES += "DISABLE_SOME_FLOATING_POINT"
    DEFINES += "_UNICODE"
    DEFINES += "UNICODE"
}

#GLUT
LIBS += $$OF/libs/glut/lib/vs/glut32.lib
INCLUDEPATH += $$OF/libs/glut/include

#GLFW
LIBS += $$OF/libs/glfw/lib/vs/glfw3.lib
INCLUDEPATH += $$OF/libs/glfw/include
INCLUDEPATH += $$OF/libs/glfw/include/GLFW

#RTAUDIO
win32:CONFIG(debug, debug|release):LIBS += $$OF/libs/rtAudio/lib/vs/rtAudioD.lib
else:win32:CONFIG(release, debug|release):LIBS += $$OF/libs/rtAudio/lib/vs/rtAudio.lib
INCLUDEPATH += $$OF/libs/rtAudio/include

#FREEIMAGE
LIBS += $$OF/libs/FreeImage/lib/vs/FreeImage.lib
INCLUDEPATH += $$OF/libs/FreeImage/include

#FREETYPE
LIBS += $$OF/libs/freetype/lib/vs/libfreetype.lib
INCLUDEPATH += $$OF/libs/freetype/include
INCLUDEPATH += $$OF/libs/freetype/include/freetype2

#QUICKTIME
LIBS += $$OF/libs/quicktime/lib/vs/qtmlClient.lib
LIBS += $$OF/libs/quicktime/lib/vs/QTSClient.lib
LIBS += $$OF/libs/quicktime/lib/vs/Rave.lib
INCLUDEPATH += $$OF/libs/quicktime/include

#FMODEX
LIBS += $$OF/libs/fmodex/lib/vs/fmodex_vc.lib
INCLUDEPATH += $$OF/libs/fmodex/include

#VIDEOINPUT
win32:CONFIG(debug, debug|release):LIBS += $$OF/libs/videoInput/lib/vs/videoInputD.lib
else:win32:CONFIG(release, debug|release):LIBS += $$OF/libs/videoInput/lib/vs/videoInput.lib
INCLUDEPATH += $$OF/libs/videoInput/include

#CAIRO
LIBS += $$OF/libs/cairo/lib/vs/cairo-static.lib
LIBS += $$OF/libs/cairo/lib/vs/pixman-1.lib
INCLUDEPATH += $$OF/libs/cairo/include
INCLUDEPATH += $$OF/libs/cairo/include/libpng15
INCLUDEPATH += $$OF/libs/cairo/include/pixman-1
INCLUDEPATH += $$OF/libs/cairo/include/cairo

#GLEW
LIBS += $$OF/libs/glew/lib/vs/glew32s.lib
INCLUDEPATH += $$OF/libs/glew/include

#GLU
LIBS += $$OF/libs/glu/lib/vs/glu32.lib
INCLUDEPATH += $$OF/libs/glu/include

#OPENSSL
LIBS += $$OF/libs/openssl/lib/vs/libeay32md.lib
LIBS += $$OF/libs/openssl/lib/vs/ssleay32md.lib
INCLUDEPATH += $$OF/libs/openssl/include
INCLUDEPATH += $$OF/libs/openssl/include/openssl

#POCO
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoCryptomdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoCryptomd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoUtilmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoUtilmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoXMLmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoXMLmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetSSLmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetSSLmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoFoundationmdd.lib
win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoFoundationmd.lib
INCLUDEPATH += $$OF/libs/poco/include

#TESS2
LIBS += $$OF/libs/tess2/lib/vs/tess2.lib
INCLUDEPATH += $$OF/libs/tess2/include

#SYSTEM LIBS
LIBS += -lmsimg32
LIBS += -lOpenGL32
LIBS += -lkernel32
LIBS += -lsetupapi
LIBS += -lVfw32
LIBS += -lcomctl32
LIBS += -ldsound
LIBS += -luser32
LIBS += -lgdi32
LIBS += -lwinspool
LIBS += -lcomdlg32
LIBS += -ladvapi32
LIBS += -lshell32
LIBS += -lole32
LIBS += -loleaut32
LIBS += -luuid
LIBS += -lcrypt32
LIBS += -lWs2_32
LIBS += -lodbc32
LIBS += -lodbccp32
LIBS += -lGLu32

#OPENFRAMEWORKS
INCLUDEPATH += $$OF/libs/openFrameworks
INCLUDEPATH += $$OF/libs/openFrameworks/types
INCLUDEPATH += $$OF/libs/openFrameworks/sound
INCLUDEPATH += $$OF/libs/openFrameworks/video
INCLUDEPATH += $$OF/libs/openFrameworks/3d
INCLUDEPATH += $$OF/libs/openFrameworks/math
INCLUDEPATH += $$OF/libs/openFrameworks/events
INCLUDEPATH += $$OF/libs/openFrameworks/utils
INCLUDEPATH += $$OF/libs/openFrameworks/gl
INCLUDEPATH += $$OF/libs/openFrameworks/app
INCLUDEPATH += $$OF/libs/openFrameworks/graphics
INCLUDEPATH += $$OF/libs/openFrameworks/communication

USE_PRECOMPILED_LIB {
    win32:CONFIG(debug, debug|release): OF_LIB_PATH = $$OF/libs/openFrameworksCompiled/lib/vs/openframeworksLib_debug.lib
    else:win32:CONFIG(release, debug|release): OF_LIB_PATH = $$OF/libs/openFrameworksCompiled/lib/vs/openframeworksLib_release.lib
}

win32:CONFIG(debug, debug|release): OF_LIB_PATH = $$OF/libs/openFrameworksCompiled/lib/vs/openframeworksLib_debug.lib
else:win32:CONFIG(release, debug|release): OF_LIB_PATH = $$OF/libs/openFrameworksCompiled/lib/vs/openframeworksLib_release.lib

if(exists($$OF_LIB_PATH)) {
    LIBS += $$OF_LIB_PATH
    message("Using precompiled library for OF")
}
else {
message("Compiling OF")
#3d
SOURCES += $$OF/libs/openFrameworks/3d/of3dPrimitives.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofMesh.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofNode.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofCamera.cpp
SOURCES += $$OF/libs/openFrameworks/3d/of3dUtils.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofEasyCam.cpp

HEADERS += $$OF/libs/openFrameworks/3d/of3dPrimitives.h
HEADERS += $$OF/libs/openFrameworks/3d/ofMesh.h
HEADERS += $$OF/libs/openFrameworks/3d/ofNode.h
HEADERS += $$OF/libs/openFrameworks/3d/ofCamera.h
HEADERS += $$OF/libs/openFrameworks/3d/of3dUtils.h
HEADERS += $$OF/libs/openFrameworks/3d/ofEasyCam.h

#app
SOURCES += $$OF/libs/openFrameworks/app/ofAppGLFWWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppGlutWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppNoWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppRunner.cpp

HEADERS += $$OF/libs/openFrameworks/app/ofAppBaseWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppGLFWWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppGlutWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppNoWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppRunner.h
HEADERS += $$OF/libs/openFrameworks/app/ofBaseApp.h

#communication
SOURCES += $$OF/libs/openFrameworks/communication/ofSerial.cpp
SOURCES += $$OF/libs/openFrameworks/communication/ofArduino.cpp

HEADERS += $$OF/libs/openFrameworks/communication/ofSerial.h
HEADERS += $$OF/libs/openFrameworks/communication/ofArduino.h

#events
SOURCES += $$OF/libs/openFrameworks/events/ofEvents.cpp

HEADERS += $$OF/libs/openFrameworks/events/ofEvents.h
HEADERS += $$OF/libs/openFrameworks/events/ofEventUtils.h

#gl
SOURCES += $$OF/libs/openFrameworks/gl/ofFbo.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLUtils.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofLight.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofMaterial.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofShader.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofTexture.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofVbo.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofVboMesh.cpp

HEADERS += $$OF/libs/openFrameworks/gl/ofFbo.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLProgrammableRenderer.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLRenderer.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLUtils.h
HEADERS += $$OF/libs/openFrameworks/gl/ofLight.h
HEADERS += $$OF/libs/openFrameworks/gl/ofMaterial.h
HEADERS += $$OF/libs/openFrameworks/gl/ofShader.h
HEADERS += $$OF/libs/openFrameworks/gl/ofTexture.h
HEADERS += $$OF/libs/openFrameworks/gl/ofVbo.h
HEADERS += $$OF/libs/openFrameworks/gl/ofVboMesh.h

#graphics
SOURCES += $$OF/libs/openFrameworks/graphics/of3dGraphics.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofBitmapFont.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofCairoRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofGraphics.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofImage.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPath.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPixels.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPolyline.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofRendererCollection.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofTessellator.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofTrueTypeFont.cpp

HEADERS += $$OF/libs/openFrameworks/graphics/of3dGraphics.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofBitmapFont.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofCairoRenderer.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofGraphics.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofImage.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPath.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPixels.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPolyline.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofRendererCollection.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofTessellator.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofTrueTypeFont.h

#math
SOURCES += $$OF/libs/openFrameworks/math/ofMath.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMatrix3x3.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMatrix4x4.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofQuaternion.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofVec2f.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofVec4f.cpp

HEADERS += $$OF/libs/openFrameworks/math/ofMath.h
HEADERS += $$OF/libs/openFrameworks/math/ofMatrix3x3.h
HEADERS += $$OF/libs/openFrameworks/math/ofMatrix4x4.h
HEADERS += $$OF/libs/openFrameworks/math/ofQuaternion.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec2f.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec3f.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec4f.h
HEADERS += $$OF/libs/openFrameworks/math/ofVectorMath.h

#sound
SOURCES += $$OF/libs/openFrameworks/sound/ofFmodSoundPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofRtAudioSoundStream.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofSoundPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofSoundStream.cpp

HEADERS += $$OF/libs/openFrameworks/sound/ofBaseSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofBaseSoundStream.h
HEADERS += $$OF/libs/openFrameworks/sound/ofFmodSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofRtAudioSoundStream.h
HEADERS += $$OF/libs/openFrameworks/sound/ofSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofSoundStream.h

#types
SOURCES += $$OF/libs/openFrameworks/types/ofBaseTypes.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofColor.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofParameter.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofParameterGroup.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofRectangle.cpp

HEADERS += $$OF/libs/openFrameworks/types/ofBaseTypes.h
HEADERS += $$OF/libs/openFrameworks/types/ofColor.h
HEADERS += $$OF/libs/openFrameworks/types/ofParameter.h
HEADERS += $$OF/libs/openFrameworks/types/ofParameterGroup.h
HEADERS += $$OF/libs/openFrameworks/types/ofPoint.h
HEADERS += $$OF/libs/openFrameworks/types/ofRectangle.h
HEADERS += $$OF/libs/openFrameworks/types/ofTypes.h

#utils
SOURCES += $$OF/libs/openFrameworks/utils/ofFileUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofLog.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofMatrixStack.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofSystemUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofThread.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofURLFileLoader.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofXml.cpp

HEADERS += $$OF/libs/openFrameworks/utils/ofConstants.h
HEADERS += $$OF/libs/openFrameworks/utils/ofFileUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofLog.h
HEADERS += $$OF/libs/openFrameworks/utils/ofMatrixStack.h
HEADERS += $$OF/libs/openFrameworks/utils/ofSystemUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofThread.h
HEADERS += $$OF/libs/openFrameworks/utils/ofURLFileLoader.h
HEADERS += $$OF/libs/openFrameworks/utils/ofUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofXml.h
HEADERS += $$OF/libs/openFrameworks/utils/ofNoise.h

#video
SOURCES += $$OF/libs/openFrameworks/video/ofDirectShowGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofQtUtils.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofQuickTimeGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofQuickTimePlayer.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofVideoGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofVideoPlayer.cpp

HEADERS += $$OF/libs/openFrameworks/video/ofDirectShowGrabber.h
HEADERS += $$OF/libs/openFrameworks/video/ofQtUtils.h
HEADERS += $$OF/libs/openFrameworks/video/ofQuickTimeGrabber.h
HEADERS += $$OF/libs/openFrameworks/video/ofQuickTimePlayer.h
HEADERS += $$OF/libs/openFrameworks/video/ofVideoGrabber.h
HEADERS += $$OF/libs/openFrameworks/video/ofVideoPlayer.h

HEADERS += $$OF/libs/openFrameworks/ofMain.h
}
#addons

#openFrameworks path.
OF = #OF_PATH#
win32:CONFIG(release, debug|release): {
    QMAKE_LFLAGS += /NODEFAULTLIB:PocoFoundationmd.lib
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMT
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBC.LIBS
    QMAKE_LFLAGS += /NODEFAULTLIB:atlthunk.lib

    DEFINES += "WIN32"
    DEFINES += "NDEBUG"
    DEFINES += "_CONSOLE"
    DEFINES += "POCO_STATIC"
    DEFINES += "CAIRO_WIN32_STATIC_BUILD"
    DEFINES += "DISABLE_SOME_FLOATING_POINT"
    DEFINES += "_UNICODE"
    DEFINES += "UNICODE"
}
else:win32:CONFIG(debug, debug|release): {
    QMAKE_LFLAGS += /NODEFAULTLIB:PocoFoundationmdd.lib
    QMAKE_LFLAGS += /NODEFAULTLIB:atlthunk.lib
    QMAKE_LFLAGS += /NODEFAULTLIB:msvcrt
    QMAKE_LFLAGS += /NODEFAULTLIB:libcmt
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBC
    QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMTD

    DEFINES += "WIN32"
    DEFINES += "_DEBUG"
    DEFINES += "_CONSOLE"
    DEFINES += "POCO_STATIC"
    DEFINES += "CAIRO_WIN32_STATIC_BUILD"
    DEFINES += "DISABLE_SOME_FLOATING_POINT"
    DEFINES += "_UNICODE"
    DEFINES += "UNICODE"
}

#GLUT
LIBS += $$OF/libs/glut/lib/vs/glut32.lib
INCLUDEPATH += $$OF/libs/glut/include

#GLFW
LIBS += $$OF/libs/glfw/lib/vs/glfw3.lib
INCLUDEPATH += $$OF/libs/glfw/include
INCLUDEPATH += $$OF/libs/glfw/include/GLFW

#RTAUDIO
win32:CONFIG(debug, debug|release):LIBS += $$OF/libs/rtAudio/lib/vs/rtAudioD.lib
else:win32:CONFIG(release, debug|release):LIBS += $$OF/libs/rtAudio/lib/vs/rtAudio.lib
INCLUDEPATH += $$OF/libs/rtAudio/include

#FREEIMAGE
LIBS += $$OF/libs/FreeImage/lib/vs/FreeImage.lib
INCLUDEPATH += $$OF/libs/FreeImage/include

#FREETYPE
LIBS += $$OF/libs/freetype/lib/vs/libfreetype.lib
INCLUDEPATH += $$OF/libs/freetype/include
INCLUDEPATH += $$OF/libs/freetype/include/freetype2

#QUICKTIME
LIBS += $$OF/libs/quicktime/lib/vs/qtmlClient.lib
LIBS += $$OF/libs/quicktime/lib/vs/QTSClient.lib
LIBS += $$OF/libs/quicktime/lib/vs/Rave.lib
INCLUDEPATH += $$OF/libs/quicktime/include

#FMODEX
LIBS += $$OF/libs/fmodex/lib/vs/fmodex_vc.lib
INCLUDEPATH += $$OF/libs/fmodex/include

#VIDEOINPUT
win32:CONFIG(debug, debug|release):LIBS += $$OF/libs/videoInput/lib/vs/videoInputD.lib
else:win32:CONFIG(release, debug|release):LIBS += $$OF/libs/videoInput/lib/vs/videoInput.lib
INCLUDEPATH += $$OF/libs/videoInput/include

#CAIRO
LIBS += $$OF/libs/cairo/lib/vs/cairo-static.lib
LIBS += $$OF/libs/cairo/lib/vs/pixman-1.lib
INCLUDEPATH += $$OF/libs/cairo/include
INCLUDEPATH += $$OF/libs/cairo/include/libpng15
INCLUDEPATH += $$OF/libs/cairo/include/pixman-1
INCLUDEPATH += $$OF/libs/cairo/include/cairo

#GLEW
LIBS += $$OF/libs/glew/lib/vs/glew32s.lib
INCLUDEPATH += $$OF/libs/glew/include

#GLU
LIBS += $$OF/libs/glu/lib/vs/glu32.lib
INCLUDEPATH += $$OF/libs/glu/include

#OPENSSL
LIBS += $$OF/libs/openssl/lib/vs/libeay32md.lib
LIBS += $$OF/libs/openssl/lib/vs/ssleay32md.lib
INCLUDEPATH += $$OF/libs/openssl/include
INCLUDEPATH += $$OF/libs/openssl/include/openssl

#POCO
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoCryptomdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoCryptomd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoUtilmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoUtilmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoXMLmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoXMLmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetSSLmdd.lib
else:win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoNetSSLmd.lib
win32:CONFIG(debug, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoFoundationmdd.lib
win32:CONFIG(release, debug|release): LIBS += $$OF/libs/poco/lib/vs/PocoFoundationmd.lib
INCLUDEPATH += $$OF/libs/poco/include

#TESS2
LIBS += $$OF/libs/tess2/lib/vs/tess2.lib
INCLUDEPATH += $$OF/libs/tess2/include

#SYSTEM LIBS
LIBS += -lmsimg32
LIBS += -lOpenGL32
LIBS += -lkernel32
LIBS += -lsetupapi
LIBS += -lVfw32
LIBS += -lcomctl32
LIBS += -ldsound
LIBS += -luser32
LIBS += -lgdi32
LIBS += -lwinspool
LIBS += -lcomdlg32
LIBS += -ladvapi32
LIBS += -lshell32
LIBS += -lole32
LIBS += -loleaut32
LIBS += -luuid
LIBS += -lcrypt32
LIBS += -lWs2_32
LIBS += -lodbc32
LIBS += -lodbccp32
LIBS += -lGLu32

#OPENFRAMEWORKS
#LIBS += $$OF/libs/openFrameworksCompiled/lib/vs/openframeworksLib_debug.lib
INCLUDEPATH += $$OF/libs/openFrameworks
INCLUDEPATH += $$OF/libs/openFrameworks/types
INCLUDEPATH += $$OF/libs/openFrameworks/sound
INCLUDEPATH += $$OF/libs/openFrameworks/video
INCLUDEPATH += $$OF/libs/openFrameworks/3d
INCLUDEPATH += $$OF/libs/openFrameworks/math
INCLUDEPATH += $$OF/libs/openFrameworks/events
INCLUDEPATH += $$OF/libs/openFrameworks/utils
INCLUDEPATH += $$OF/libs/openFrameworks/gl
INCLUDEPATH += $$OF/libs/openFrameworks/app
INCLUDEPATH += $$OF/libs/openFrameworks/graphics
INCLUDEPATH += $$OF/libs/openFrameworks/communication

#3d
SOURCES += $$OF/libs/openFrameworks/3d/of3dPrimitives.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofMesh.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofNode.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofCamera.cpp
SOURCES += $$OF/libs/openFrameworks/3d/of3dUtils.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofEasyCam.cpp

HEADERS += $$OF/libs/openFrameworks/3d/of3dPrimitives.h
HEADERS += $$OF/libs/openFrameworks/3d/ofMesh.h
HEADERS += $$OF/libs/openFrameworks/3d/ofNode.h
HEADERS += $$OF/libs/openFrameworks/3d/ofCamera.h
HEADERS += $$OF/libs/openFrameworks/3d/of3dUtils.h
HEADERS += $$OF/libs/openFrameworks/3d/ofEasyCam.h

#app
SOURCES += $$OF/libs/openFrameworks/app/ofAppGLFWWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppGlutWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppNoWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppRunner.cpp

HEADERS += $$OF/libs/openFrameworks/app/ofAppBaseWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppGLFWWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppGlutWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppNoWindow.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppRunner.h
HEADERS += $$OF/libs/openFrameworks/app/ofBaseApp.h

#communication
SOURCES += $$OF/libs/openFrameworks/communication/ofSerial.cpp
SOURCES += $$OF/libs/openFrameworks/communication/ofArduino.cpp

HEADERS += $$OF/libs/openFrameworks/communication/ofSerial.h
HEADERS += $$OF/libs/openFrameworks/communication/ofArduino.h

#events
SOURCES += $$OF/libs/openFrameworks/events/ofEvents.cpp

HEADERS += $$OF/libs/openFrameworks/events/ofEvents.h
HEADERS += $$OF/libs/openFrameworks/events/ofEventUtils.h

#gl
SOURCES += $$OF/libs/openFrameworks/gl/ofFbo.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLUtils.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofLight.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofMaterial.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofShader.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofTexture.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofVbo.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofVboMesh.cpp

HEADERS += $$OF/libs/openFrameworks/gl/ofFbo.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLProgrammableRenderer.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLRenderer.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLUtils.h
HEADERS += $$OF/libs/openFrameworks/gl/ofLight.h
HEADERS += $$OF/libs/openFrameworks/gl/ofMaterial.h
HEADERS += $$OF/libs/openFrameworks/gl/ofShader.h
HEADERS += $$OF/libs/openFrameworks/gl/ofTexture.h
HEADERS += $$OF/libs/openFrameworks/gl/ofVbo.h
HEADERS += $$OF/libs/openFrameworks/gl/ofVboMesh.h

#graphics
SOURCES += $$OF/libs/openFrameworks/graphics/of3dGraphics.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofBitmapFont.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofCairoRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofGraphics.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofImage.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPath.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPixels.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPolyline.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofRendererCollection.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofTessellator.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofTrueTypeFont.cpp

HEADERS += $$OF/libs/openFrameworks/graphics/of3dGraphics.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofBitmapFont.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofCairoRenderer.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofGraphics.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofImage.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPath.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPixels.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPolyline.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofRendererCollection.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofTessellator.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofTrueTypeFont.h

#math
SOURCES += $$OF/libs/openFrameworks/math/ofMath.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMatrix3x3.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMatrix4x4.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofQuaternion.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofVec2f.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofVec4f.cpp

HEADERS += $$OF/libs/openFrameworks/math/ofMath.h
HEADERS += $$OF/libs/openFrameworks/math/ofMatrix3x3.h
HEADERS += $$OF/libs/openFrameworks/math/ofMatrix4x4.h
HEADERS += $$OF/libs/openFrameworks/math/ofQuaternion.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec2f.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec3f.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec4f.h
HEADERS += $$OF/libs/openFrameworks/math/ofVectorMath.h

#sound

SOURCES += $$OF/libs/openFrameworks/sound/ofFmodSoundPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofRtAudioSoundStream.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofSoundPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofSoundStream.cpp

HEADERS += $$OF/libs/openFrameworks/sound/ofBaseSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofBaseSoundStream.h
HEADERS += $$OF/libs/openFrameworks/sound/ofFmodSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofRtAudioSoundStream.h
HEADERS += $$OF/libs/openFrameworks/sound/ofSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofSoundStream.h

#types
SOURCES += $$OF/libs/openFrameworks/types/ofBaseTypes.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofColor.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofParameter.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofParameterGroup.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofRectangle.cpp

HEADERS += $$OF/libs/openFrameworks/types/ofBaseTypes.h
HEADERS += $$OF/libs/openFrameworks/types/ofColor.h
HEADERS += $$OF/libs/openFrameworks/types/ofParameter.h
HEADERS += $$OF/libs/openFrameworks/types/ofParameterGroup.h
HEADERS += $$OF/libs/openFrameworks/types/ofPoint.h
HEADERS += $$OF/libs/openFrameworks/types/ofRectangle.h
HEADERS += $$OF/libs/openFrameworks/types/ofTypes.h

#utils
SOURCES += $$OF/libs/openFrameworks/utils/ofFileUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofLog.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofMatrixStack.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofSystemUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofThread.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofURLFileLoader.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofXml.cpp

HEADERS += $$OF/libs/openFrameworks/utils/ofConstants.h
HEADERS += $$OF/libs/openFrameworks/utils/ofFileUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofLog.h
HEADERS += $$OF/libs/openFrameworks/utils/ofMatrixStack.h
HEADERS += $$OF/libs/openFrameworks/utils/ofSystemUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofThread.h
HEADERS += $$OF/libs/openFrameworks/utils/ofURLFileLoader.h
HEADERS += $$OF/libs/openFrameworks/utils/ofUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofXml.h
HEADERS += $$OF/libs/openFrameworks/utils/ofNoise.h

#video
SOURCES += $$OF/libs/openFrameworks/video/ofDirectShowGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofQtUtils.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofQuickTimeGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofQuickTimePlayer.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofVideoGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofVideoPlayer.cpp

HEADERS += $$OF/libs/openFrameworks/video/ofDirectShowGrabber.h
HEADERS += $$OF/libs/openFrameworks/video/ofQtUtils.h
HEADERS += $$OF/libs/openFrameworks/video/ofQuickTimeGrabber.h
HEADERS += $$OF/libs/openFrameworks/video/ofQuickTimePlayer.h
HEADERS += $$OF/libs/openFrameworks/video/ofVideoGrabber.h
HEADERS += $$OF/libs/openFrameworks/video/ofVideoPlayer.h

HEADERS += $$OF/libs/openFrameworks/ofMain.h

#addons


typo

typo

git-svn-id: 2cc691a92423afb73d43abf86552d58822d2fb7e@365 ac7a513c-5e3a-0410-af42-968c3ac6e7dc

# winks
HEADERS += \
	$$PWD/winks/kshelpers.h \
	$$PWD/winks/ksvideohelpers.h \
	$$PWD/winks/gstksclock.h \
	$$PWD/winks/gstksvideodevice.h \
	$$PWD/winks/gstksvideosrc.h

SOURCES += \
	$$PWD/winks/kshelpers.c \
	$$PWD/winks/ksvideohelpers.c \
	$$PWD/winks/gstksclock.c \
	$$PWD/winks/gstksvideodevice.c \
	#$$PWD/winks/gstksvideosrc.c
	$$PWD/winks_static.c

LIBS *= \
	-lsetupapi \
	-lksuser \
	-lamstrmid

# winks
HEADERS += \
	$$PWD/winks/kshelpers.h \
	$$PWD/winks/ksvideohelpers.h \
	$$PWD/winks/gstksclock.h \
	$$PWD/winks/gstksvideodevice.h \
	$$PWD/winks/gstksvideosrc.h

SOURCES += \
	$$PWD/winks/kshelpers.c \
	$$PWD/winks/ksvideohelpers.c \
	$$PWD/winks/gstksclock.c \
	$$PWD/winks/gstksvideodevice.c \
	#$$PWD/winks/gstksvideosrc.c
	$$PWD/winks_static.c

LIBS *= \
	-lsetupapi
	-lksuser
	-lamstrmid