Mercurial > hgweb.cgi > qtargs
diff src/qargs.pro @ 0:04ad7227e290
Rebuilding structure for development.
author | John Schneiderman <JohnMS@CodeGNU.com> |
---|---|
date | Sat, 14 Jun 2014 13:17:37 +0000 |
parents | |
children | 49efa3ecaa98 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/qargs.pro Sat Jun 14 13:17:37 2014 +0000 @@ -0,0 +1,126 @@ +#******************************************************************************* +#** This file is part of QtArgs. *** +#** *** +#** Copyright (C) 2011, 2012, 2014 *** +#** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> *** +#** *** +#** This program is free software: you can redistribute it and/or modify *** +#** it under the terms of the GNU Lesser General Public License as *** +#** published by the Free Software Foundation, either version 3 of the *** +#** License, or (at your option) any later version. *** +#** *** +#** This program is distributed in the hope that it will be useful, but *** +#** WITHOUT ANY WARRANTY; without even the implied warranty of *** +#** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *** +#** See the GNU Lesser General Public License for more details. *** +#** *** +#** You should have received a copy of the GNU Lesser General Public *** +#** License along with this program. If not, see *** +#** <http://www.gnu.org/licenses/>. *** +#******************************************************************************* +TEMPLATE = lib +QT -= gui +VERSION = 1.3.0 +DEFINES += \ + QTARGS_LIBRARY \ + LIBRARY_VERSION=$$quote('"\\"$${VERSION}\\""') \ + COPYRIGHT_YEARS=$$quote('"\\"2011 - 2014\\""') + +CONFIG += \ + qt \ + dynamic \ + exceptions \ + stl +CONFIG (debug, debug|release) { + !buildpass:message(Compiling QtArgs debug build.) + TARGET = qtargsd + DESTDIR = ../debug + OBJECTS_DIR = debug + CONFIG -= release + CONFIG += \ + warn_on \ + debug + linux-g++ { + !buildpass:message(Setting GCC debug flags.) + QMAKE_CXXFLAGS_DEBUG += \ + -std=c++98 \ # Conform to ISO standard + -pg \ # Enable code profiling + -fstack-protector-all \ # Check for buffer overflows + -Wall \ # Enable all normal code execution warnings + -Wextra \ # Enable extra warnings not enabled by Wall +# @bug Currently the build breaks due to QMapNode. +# -Wctor-dtor-privacy \ # Warn if a class seems unusable due to ctor + -Wold-style-cast \ # Warn C-style cast is used within a program. + -Woverloaded-virtual \ # Warn when a function declaration hides + # virtual functions from a base class + -Wswitch-enum \ # Warn whenever a switch statement has an index of + # enumerated type and lacks a case for one or more + # of the named codes of that enumeration. + -Wformat-security \ # Warn about uses of format functions + # that represent possible security problems. + -Wlogical-op \ # Warn about suspicious uses of + # logical operators in expressions. + -Wstack-protector \ # Warns about functions that will not + # be protected against stack smashing. + -g3 # Produce debugging information in the OS's native format + } + win32-g++ { + !buildpass:message(Setting MinGW debug flags.) + QMAKE_CXXFLAGS_DEBUG += \ + -Wall \ # Enable all normal code execution warnings + -Wextra \ # Enable extra warnings not enabled by Wall +# @bug Currently the build breaks due to QMapNode. +# -Wctor-dtor-privacy \ # Warn if a class seems unusable due to ctor + -Wold-style-cast \ # Warn C-style cast is used within a program. + -Woverloaded-virtual \ # Warn when a function declaration hides + # virtual functions from a base class + -Wswitch-enum \ # Warn whenever a switch statement has an index of + # enumerated type and lacks a case for one or more + # of the named codes of that enumeration. + -Wformat-security \ # Warn about uses of format functions + # that represent possible security problems. + -Wlogical-op \ # Warn about suspicious uses of + # logical operators in expressions. + -Wstack-protector # Warns about functions that will not + # be protected against stack smashing. + } + } else { + !buildpass:message(Compiling QtArgs release build.) + TARGET = qtargs + DESTDIR = ../release + OBJECTS_DIR = release + CONFIG -= debug + CONFIG += release + DEFINES += QT_NO_DEBUG_OUTPUT + linux-g++ { + !buildpass:message(Setting GCC release flags.) + QMAKE_CXXFLAGS_RELEASE += -O3 # Use all optimizations from O2 and more. + } +} +MOC_DIR = $$OBJECTS_DIR +UI_DIR = $$OBJECTS_DIR + +SOURCES += \ + qargs.cpp + +HEADERS += \ + qargs.h \ + qargs_global.h + +isEmpty(PREFIX) { + win32 { + PREFIX = $$quote(C:\\QtSDK\\QtArgs\\) + } else { + PREFIX = /usr + } +} +isEmpty(LIB_PATH) { + target.path += $${PREFIX}/lib +} else { + target.path += $${PREFIX}/$$(LIB_PATH) +} +headers.path += $${PREFIX}/include +headers.files += *.h +INSTALLS += \ + target \ + headers