diff options
author | sapier <Sapier at GMX dot net> | 2014-03-02 23:49:19 +0100 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-03-02 23:49:19 +0100 |
commit | 3e52dd5c6838e87acaa45a233fa322b7135251e4 (patch) | |
tree | 188c85e38e827cbdcb4a03a384cbe9489e0219f6 /src | |
parent | baee91bf78cdc17a401ad82ee14e2917d44be8fb (diff) | |
download | minetest-3e52dd5c6838e87acaa45a233fa322b7135251e4.tar.gz minetest-3e52dd5c6838e87acaa45a233fa322b7135251e4.tar.bz2 minetest-3e52dd5c6838e87acaa45a233fa322b7135251e4.zip |
Improved win32 file version information
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/cmake_config.h.in | 6 | ||||
-rw-r--r-- | src/config.h | 14 |
3 files changed, 23 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a5cad8fc1..562306e10 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -385,7 +385,7 @@ set(common_SRCS ${UTIL_SRCS} ) -# This gives us the icon +# This gives us the icon and file version information if(WIN32) set(WINRESOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc) if(MINGW) @@ -396,7 +396,8 @@ if(WIN32) COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_SOURCE_DIR} -i${WINRESOURCE_FILE} -o ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${WINRESOURCE_FILE}) SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o) else(MINGW) # Probably MSVC set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE}) diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in index 75e448f79..17d3c2249 100644 --- a/src/cmake_config.h.in +++ b/src/cmake_config.h.in @@ -5,6 +5,7 @@ #define CMAKE_PROJECT_NAME "@PROJECT_NAME@" #define CMAKE_VERSION_STRING "@VERSION_STRING@" +#define CMAKE_PRODUCT_VERSION_STRING "@VERSION_MAJOR@.@VERSION_MINOR@" #define CMAKE_RUN_IN_PLACE @RUN_IN_PLACE@ #define CMAKE_USE_GETTEXT @USE_GETTEXT@ #define CMAKE_USE_CURL @USE_CURL@ @@ -13,6 +14,11 @@ #define CMAKE_STATIC_SHAREDIR "@SHAREDIR@" #define CMAKE_USE_LEVELDB @USE_LEVELDB@ #define CMAKE_USE_LUAJIT @USE_LUAJIT@ +#define CMAKE_VERSION_MAJOR @VERSION_MAJOR@ +#define CMAKE_VERSION_MINOR @VERSION_MINOR@ +#define CMAKE_VERSION_PATCH @VERSION_PATCH@ +#define CMAKE_VERSION_PATCH_ORIG @VERSION_PATCH_ORIG@ +#define CMAKE_VERSION_EXTRA_STRING "@VERSION_EXTRA@" #ifdef NDEBUG #define CMAKE_BUILD_TYPE "Release" diff --git a/src/config.h b/src/config.h index 1c0aac4f2..55bbb5bee 100644 --- a/src/config.h +++ b/src/config.h @@ -36,6 +36,20 @@ #define USE_LEVELDB CMAKE_USE_LEVELDB #undef USE_LUAJIT #define USE_LUAJIT CMAKE_USE_LUAJIT + #undef VERSION_MAJOR + #define VERSION_MAJOR CMAKE_VERSION_MAJOR + #undef VERSION_MINOR + #define VERSION_MINOR CMAKE_VERSION_MINOR + #undef VERSION_PATCH + #define VERSION_PATCH CMAKE_VERSION_PATCH + #undef VERSION_PATCH_ORIG + #define VERSION_PATCH_ORIG CMAKE_VERSION_PATCH_ORIG + #undef VERSION_STRING + #define VERSION_STRING CMAKE_VERSION_STRING + #undef PRODUCT_VERSION_STRING + #define PRODUCT_VERSION_STRING CMAKE_PRODUCT_VERSION_STRING + #undef VERSION_EXTRA_STRING + #define VERSION_EXTRA_STRING CMAKE_VERSION_EXTRA_STRING #endif #endif |