added version string

This commit is contained in:
Anselme FRANÇOIS 2016-06-04 14:47:18 +02:00
parent ab7da98bde
commit 133e36d187
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,9 @@
project(PixelWars)
cmake_minimum_required(VERSION 2.8)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
# choose source file
file(GLOB EXEC_SRC_LIST src/*.cpp)
file(GLOB RESOURCES_FILES src/*.h resources.qrc src/*.ui shaders/*.glsl)
@ -22,4 +25,8 @@ set(QT_MODULE core gui widgets opengl)
set(CMAKE_TEMPLATE_PATH "../CMakeTemplate")
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_definitions(-DDEBUG_MODE)
endif()
include(${CMAKE_TEMPLATE_PATH}/template.cmake)

View File

@ -2,10 +2,13 @@
#include <QApplication>
#include <qtutils.h>
#include <QSurfaceFormat>
#include "Version.h"
int main(int argc, char *argv[])
{
#ifdef DEBUG_MODE
printf("Starting PixelWars %d.%d\n", VERSION_MAJOR, VERSION_MINOR);
#endif
QSurfaceFormat format;
format.setMinorVersion(3);
format.setMajorVersion(3);