summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/CMakeLists.txt4
-rw-r--r--src/common/common.h4
-rw-r--r--src/common/emu_window.h3
-rw-r--r--src/common/scm_rev.cpp.in18
-rw-r--r--src/common/scm_rev.h14
-rw-r--r--src/common/version.cpp45
6 files changed, 37 insertions, 51 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 738144927..1495e433b 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,3 +1,5 @@
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/scm_rev.cpp" @ONLY)
+
set(SRCS break_points.cpp
console_listener.cpp
extended_trace.cpp
@@ -15,6 +17,6 @@ set(SRCS break_points.cpp
thread.cpp
timer.cpp
utf8.cpp
- version.cpp)
+ ${CMAKE_CURRENT_BINARY_DIR}/scm_rev.cpp)
add_library(common STATIC ${SRCS})
diff --git a/src/common/common.h b/src/common/common.h
index 64a0d7812..a281b21cc 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -12,10 +12,6 @@
#include <stdio.h>
#include <string.h>
-// SVN version number
-extern const char *g_scm_rev_str;
-extern const char *g_netplay_citra_ver;
-
// Force enable logging in the right modes. For some reason, something had changed
// so that debugfast no longer logged.
#if defined(_DEBUG) || defined(DEBUGFAST)
diff --git a/src/common/emu_window.h b/src/common/emu_window.h
index e70b99ec1..c53d6d7a2 100644
--- a/src/common/emu_window.h
+++ b/src/common/emu_window.h
@@ -5,6 +5,7 @@
#pragma once
#include "common/common.h"
+#include "common/scm_rev.h"
// Abstraction class used to provide an interface between emulation code and the frontend (e.g. SDL,
// QGLWidget, GLFW, etc...)
@@ -66,7 +67,7 @@ public:
protected:
EmuWindow() : m_client_area_width(640), m_client_area_height(480) {
char window_title[255];
- sprintf(window_title, "citra-%s", g_scm_rev_str);
+ sprintf(window_title, "citra-%s", Common::g_scm_desc);
m_window_title = window_title;
}
virtual ~EmuWindow() {}
diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in
new file mode 100644
index 000000000..9e2bcfdd8
--- /dev/null
+++ b/src/common/scm_rev.cpp.in
@@ -0,0 +1,18 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#include "common/scm_rev.h"
+
+#define GIT_REV "@GIT_REV@"
+#define GIT_REF_SPEC "@GIT_REF_SPEC@"
+#define GIT_DESC "@GIT_DESC@"
+
+namespace Common {
+
+const char g_scm_rev[] = GIT_REV;
+const char g_scm_ref_spec[] = GIT_REF_SPEC;
+const char g_scm_desc[] = GIT_DESC;
+
+} // namespace
+
diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h
new file mode 100644
index 000000000..7f5ce119c
--- /dev/null
+++ b/src/common/scm_rev.h
@@ -0,0 +1,14 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#pragma once
+
+namespace Common {
+
+extern const char g_scm_rev[];
+extern const char g_scm_ref_spec[];
+extern const char g_scm_desc[];
+
+} // namespace
+
diff --git a/src/common/version.cpp b/src/common/version.cpp
deleted file mode 100644
index 2e0c7390c..000000000
--- a/src/common/version.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 Dolphin Emulator Project
-// Licensed under GPLv2
-// Refer to the license.txt file included.
-
-#include "common/common.h"
-#include "common/scm_rev.h"
-
-#ifdef _DEBUG
- #define BUILD_TYPE_STR "Debug "
-#elif defined DEBUGFAST
- #define BUILD_TYPE_STR "DebugFast "
-#else
- #define BUILD_TYPE_STR ""
-#endif
-
-const char *g_scm_rev_str =
-#if !SCM_IS_MASTER
- "[" SCM_BRANCH_STR "] "
-#endif
-
-#ifdef __INTEL_COMPILER
- BUILD_TYPE_STR SCM_DESC_STR "-ICC";
-#else
- BUILD_TYPE_STR SCM_DESC_STR;
-#endif
-
-#ifdef _M_X64
-#define NP_ARCH "x64"
-#else
-#ifdef _M_ARM
-#define NP_ARCH "ARM"
-#else
-#define NP_ARCH "x86"
-#endif
-#endif
-
-#ifdef _WIN32
-const char *g_netplay_citra_ver = SCM_DESC_STR " W" NP_ARCH;
-#elif __APPLE__
-const char *g_netplay_citra_ver = SCM_DESC_STR " M" NP_ARCH;
-#else
-const char *g_netplay_citra_ver = SCM_DESC_STR " L" NP_ARCH;
-#endif
-
-const char *scm_rev_git_str = SCM_REV_STR;