diff --git a/.gitignore b/.gitignore index eca47f8..c16edcd 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ Release/ .cproject .project *.launch + +src/config.h \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 458ac95..ace9e99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/Texture-Extractor.h b/src/Texture-Extractor.h index 6db89d2..a92aa5f 100644 --- a/src/Texture-Extractor.h +++ b/src/Texture-Extractor.h @@ -10,6 +10,7 @@ #include #include #endif +#include "config.h" #include "options.h" #include "HMT_Parser.h" #include "RS_images.h" diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..32f49cf --- /dev/null +++ b/src/config.h.in @@ -0,0 +1 @@ +#define VERSION "@PROJECT_VERSION@"