All: Put version.h somewhere better

This commit is contained in:
Jeffrey Pfau 2016-05-04 01:36:25 -07:00
parent 93e5b6da7b
commit 24c0893cf5
14 changed files with 18 additions and 10 deletions

View File

@ -106,16 +106,16 @@ function(find_feature FEATURE_NAME FEATURE_REQUIRES)
endfunction()
# Version information
add_custom_target(version-info ALL ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/src/util/version.c.in
add_custom_target(version-info ALL ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/src/core/version.c.in
COMMAND ${CMAKE_COMMAND}
-DBINARY_NAME=${BINARY_NAME}
-DCONFIG_FILE=${CMAKE_CURRENT_SOURCE_DIR}/src/util/version.c.in
-DCONFIG_FILE=${CMAKE_CURRENT_SOURCE_DIR}/src/core/version.c.in
-DOUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/version.c
-P ${CMAKE_CURRENT_SOURCE_DIR}/version.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
include(${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/util/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
list(APPEND UTIL_SRC ${CMAKE_CURRENT_BINARY_DIR}/version.c)
source_group("Generated sources" FILES ${CMAKE_CURRENT_BINARY_DIR}/version.c)

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "config.h"
#include "core/version.h"
#include "util/formatting.h"
#include "util/string.h"
#include "util/vfs.h"

View File

@ -1,9 +1,9 @@
/* Copyright (c) 2013-2015 Jeffrey Pfau
/* Copyright (c) 2013-2016 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "util/version.h"
#include "core/version.h"
const char* const gitCommit = "${GIT_COMMIT}";
const char* const gitCommitShort = "${GIT_COMMIT_SHORT}";

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2015 Jeffrey Pfau
/* Copyright (c) 2013-2016 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@ -8,6 +8,7 @@
#ifdef USE_CLI_DEBUGGER
#include "core/core.h"
#include "core/version.h"
#include "parser.h"
#include <signal.h>

View File

@ -6,6 +6,7 @@
#include "commandline.h"
#include "core/config.h"
#include "core/version.h"
#include "util/string.h"
#include <fcntl.h>

View File

@ -3,7 +3,8 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "core/core.h"
#include "core/core.h"
#include "core/version.h"
#include "util/socket.h"
#include <SDL.h>

View File

@ -8,6 +8,7 @@
#include "util/common.h"
#include "core/core.h"
#include "core/version.h"
#ifdef M_CORE_GB
#include "gb/core.h"
#include "gb/gb.h"

View File

@ -6,7 +6,7 @@
#include "AboutScreen.h"
extern "C" {
#include "util/version.h"
#include "core/version.h"
}
#include <QPixmap>

View File

@ -16,6 +16,7 @@
#include <QIcon>
extern "C" {
#include "core/version.h"
#include "feature/commandline.h"
#include "util/nointro.h"
#include "util/socket.h"

View File

@ -18,6 +18,7 @@
#include <QSpinBox>
extern "C" {
#include "core/version.h"
#include "platform/video-backend.h"
#if !defined(_WIN32) || defined(USE_EPOXY)

View File

@ -38,6 +38,7 @@
#include "VideoView.h"
extern "C" {
#include "core/version.h"
#ifdef M_CORE_GB
#include "gb/gb.h"
#endif

View File

@ -5,6 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "main.h"
#include "core/version.h"
void mSDLGLCommonSwap(struct VideoBackend* context) {
struct mSDLRenderer* renderer = (struct mSDLRenderer*) context->user;
#if SDL_VERSION_ATLEAST(2, 0, 0)

View File

@ -21,8 +21,6 @@
#include <stdlib.h>
#include <string.h>
#include "version.h"
#ifdef _WIN32
// WinSock2 gets very angry if it's included too late
#include <winsock2.h>