[colobot] 15/377: Separated config.h and version.h

Didier Raboud odyx at moszumanska.debian.org
Wed Mar 30 13:33:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit fd07589ebb0d89162322194e1bf556c7162b7ed7
Author: krzys-h <krzys_h at interia.pl>
Date:   Sat Sep 26 21:12:12 2015 +0200

    Separated config.h and version.h
    
    This prevents unnecessary recompilation of some files when version number changes
---
 src/CMakeLists.txt          | 1 +
 src/app/app.cpp             | 2 +-
 src/app/main.cpp            | 1 +
 src/app/signal_handlers.cpp | 2 +-
 src/common/config.h.cmake   | 5 -----
 src/common/version.h.cmake  | 6 ++++++
 src/ui/screen/screen.cpp    | 2 +-
 7 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b8d6987..5e445a9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -54,6 +54,7 @@ endif()
 
 # Configure file
 configure_file(common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/common/config.h)
+configure_file(common/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/common/version.h)
 
 set(OPENAL_SRC "")
 
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 1ab3caa..502e60a 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -19,7 +19,7 @@
 
 #include "app/app.h"
 
-#include "common/config.h"
+#include "common/version.h"
 
 #include "app/controller.h"
 #include "app/input.h"
diff --git a/src/app/main.cpp b/src/app/main.cpp
index b732adf..cf0283c 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -23,6 +23,7 @@
  */
 
 #include "common/config.h"
+#include "common/version.h"
 
 #include "app/app.h"
 #include "app/signal_handlers.h"
diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp
index d2a7bf5..f00a8d8 100644
--- a/src/app/signal_handlers.cpp
+++ b/src/app/signal_handlers.cpp
@@ -19,7 +19,7 @@
 
 #include "app/signal_handlers.h"
 
-#include "common/config.h"
+#include "common/version.h"
 
 #include "common/resources/resourcemanager.h"
 
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index 05af962..2d3dbe1 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -26,10 +26,5 @@
 
 #cmakedefine PORTABLE @PORTABLE@
 
-#define COLOBOT_FULLNAME "Colobot: Gold Edition @COLOBOT_VERSION_FULL@"
-#define COLOBOT_VERSION_DISPLAY "@COLOBOT_VERSION_DISPLAY@"
-
 #define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@"
 #define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@"
-
-#define BUILD_NUMBER @BUILD_NUMBER@
diff --git a/src/common/version.h.cmake b/src/common/version.h.cmake
new file mode 100644
index 0000000..5749421
--- /dev/null
+++ b/src/common/version.h.cmake
@@ -0,0 +1,6 @@
+#pragma once
+
+#define COLOBOT_FULLNAME "Colobot: Gold Edition @COLOBOT_VERSION_FULL@"
+#define COLOBOT_VERSION_DISPLAY "@COLOBOT_VERSION_DISPLAY@"
+
+#define BUILD_NUMBER @BUILD_NUMBER@
diff --git a/src/ui/screen/screen.cpp b/src/ui/screen/screen.cpp
index 6eb508a..7adc5df 100644
--- a/src/ui/screen/screen.cpp
+++ b/src/ui/screen/screen.cpp
@@ -19,7 +19,7 @@
 
 #include "ui/screen/screen.h"
 
-#include "common/config.h"
+#include "common/version.h"
 
 #include "app/app.h"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list