1
0

Move version to separate file

This commit is contained in:
Scott E. Graves
2017-05-17 13:22:26 -05:00
parent 20d65eabb7
commit cb52206eee
5 changed files with 18 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.3)
#Common Configuration Pre-setup
set(SIADRIVE_VERSION 0.1_Alpha2)
set(SIADRIVE_VERSION 0.1_Alpha3)
set(SIA_VERSION 1.2.1)
string(REPLACE "\\" "/" SIADRIVE_INSTALL_FOLDER ${SIADRIVE_INSTALL_FOLDER})
set(EXTERNAL_BUILD_ROOT ${CMAKE_BINARY_DIR}/external)
@@ -16,6 +16,7 @@ add_definitions(-DTTMATH_NOASM)
#SiaDrive API Library
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/siadrive_api/siacommon.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/siadrive_api/siacommon.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/siadrive_api/siadrivever.cpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/siadrive_api/siadrivever.cpp @ONLY)
file(GLOB_RECURSE SIADRIVE_API_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/siadrive_api/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/siadrive_api/*.cxx

View File

@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "SiaDrive"
#define MyAppVersion "@SIADRIVE_VERSION@"
#define MyAppVersion "v@SIADRIVE_VERSION@"
#define MyAppPublisher "SiaExtensions"
#define MyAppURL "https://github.com/SiaExtensions/SiaDrive"
#define MyAppExeName "siadrive.exe"

View File

@@ -2,8 +2,6 @@
#define _SIACOMMON_H
#include <cstdint>
#define SIADRIVE_VERSION_STRING "@SIADRIVE_VERSION@"
#define COMPAT_SIAD_VERSION "@SIA_VERSION@"
#ifdef _WIN32
// Disable DLL-interface warnings
@@ -57,6 +55,9 @@
#include <deque>
using json = nlohmann::json;
SIADRIVE_EXPORTABLE extern const char* SIADRIVE_VERSION_STRING;
SIADRIVE_EXPORTABLE extern const char* COMPAT_SIAD_VERSION;
#define NS_BEGIN(n) namespace n {

View File

@@ -0,0 +1,6 @@
#include <siacommon.h>
extern "C" {
const char* SIADRIVE_VERSION_STRING="0.1_Alpha3";
const char* COMPAT_SIAD_VERSION="1.2.1";
}

View File

@@ -0,0 +1,6 @@
#include <siacommon.h>
extern "C" {
const char* SIADRIVE_VERSION_STRING="@SIADRIVE_VERSION@";
const char* COMPAT_SIAD_VERSION="@SIA_VERSION@";
}