Implement CMake version control

This commit is contained in:
JackCarterSmith 2020-09-09 00:48:21 +02:00
parent 15032331ee
commit b716d2434a
No known key found for this signature in database
GPG Key ID: B05F75E5934B1D7F
4 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -59,3 +59,5 @@ Release/
.cproject
.project
*.launch
src/config.h

View File

@ -10,10 +10,8 @@ cmake_policy(VERSION 3.1)
project(rse-texture VERSION 1.0.1 DESCRIPTION "RogueSquadron Extractor - Texture" LANGUAGES C)
set(CMAKE_BUILD_TYPE Release)
set(RSE_TEX_NAME RSE_Texture-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h @ONLY)
include(GNUInstallDirs)
#include(CheckTypeSize)
#include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCSourceCompiles)

View File

@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#endif
#include "config.h"
#include "options.h"
#include "HMT_Parser.h"
#include "RS_images.h"

1
src/config.h.in Normal file
View File

@ -0,0 +1 @@
#define VERSION "@PROJECT_VERSION@"