mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Improved win32 file version information
This commit is contained in:
parent
baee91bf78
commit
3e52dd5c68
5 changed files with 77 additions and 2 deletions
|
@ -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})
|
||||
|
|
|
@ -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"
|
||||
|
|
14
src/config.h
14
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue