find_package(Qt4 REQUIRED)
find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED)
-set(VERSION 0.1.0)
+#===============================================================================
+#= Config Header
+#-------------------------------------------------------------------------------
+
+set(PV_VERSION_MAJOR 0)
+set(PV_VERSION_MINOR 1)
+set(PV_VERSION_MICRO 0)
+set(PV_VERSION_STRING
+ ${PV_VERSION_MAJOR}.${PV_VERSION_MINOR}.${PV_VERSION_MICRO}
+)
+
+configure_file (
+ ${PROJECT_SOURCE_DIR}/config.h.in
+ ${PROJECT_BINARY_DIR}/config.h
+)
#===============================================================================
#= Sources
#-------------------------------------------------------------------------------
add_definitions(${QT_DEFINITIONS})
-add_definitions(-DAPP_VERSION="${VERSION}")
#===============================================================================
#= Global Include Directories
--- /dev/null
+/*
+ * This file is part of pulseview.
+ *
+ * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _PULSEVIEW_CONFIG_H
+#define _PULSEVIEW_CONFIG_H
+
+/* Pulseview version information */
+#define PV_VERSION_MAJOR @PV_VERSION_MAJOR@
+#define PV_VERSION_MINOR @PV_VERSION_MINOR@
+#define PV_VERSION_MICRO @PV_VERSION_MICRO@
+#define PV_VERSION_STRING "@PV_VERSION_STRING@"
+
+#endif
#include <QtGui/QApplication>
#include <QDebug>
+
#include "pv/mainwindow.h"
+#include "config.h"
+
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
/* Set some application metadata. */
- QApplication::setApplicationVersion(APP_VERSION);
+ QApplication::setApplicationVersion(PV_VERSION_STRING);
QApplication::setApplicationName("PulseView");
QApplication::setOrganizationDomain("http://www.sigrok.org");