mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Buildsystem: Generate revision.h additionally during initial cmake run, also fixes displaying revision during run
--HG-- branch : trunk
This commit is contained in:
@@ -57,6 +57,9 @@ if( UNIX )
|
||||
find_package(BZip2)
|
||||
endif()
|
||||
|
||||
# Find revision ID and hash of the sourcetree
|
||||
include(cmake/genrev.cmake)
|
||||
|
||||
# print out the results before continuing
|
||||
include(cmake/showoptions.cmake)
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@ if(NOT hg_rev_id_str MATCHES "Archive")
|
||||
endif()
|
||||
string(REPLACE "+" "" hg_rev_hash ${hg_rev_hash_str})
|
||||
|
||||
# Its not set during initial run
|
||||
if(NOT BUILDDIR)
|
||||
set(BUILDDIR ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
# Create the actual revision.h file from the above params
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/revision.h.in.cmake"
|
||||
|
||||
Reference in New Issue
Block a user