Make titlebar and about dialog fancy for cmake build.

Windows needs fixing.
This commit is contained in:
Jordan Woyak
2011-08-21 16:30:19 -05:00
parent 95fd6e925c
commit e8fe15c3f7
13 changed files with 54 additions and 24 deletions

View File

@ -49,10 +49,18 @@ endfunction(enable_precompiled_headers)
# for revision info
include(FindGit OPTIONAL)
if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION)
# defines DOLPHIN_WC_REVISION
# defines DOLPHIN_WC_REVISION
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_VARIABLE DOLPHIN_WC_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DOLPHIN_WC_DESCRIBE
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --always
OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE
OUTPUT_STRIP_TRAILING_WHITESPACE)
# defines DOLPHIN_WC_BRANCH
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE DOLPHIN_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# Various compile flags
@ -409,8 +417,19 @@ endif(NOT DISABLE_WX)
########################################
# Pre-build events: Define configuration variables and write svnrev header
#
file(WRITE ${PROJECT_BINARY_DIR}/Source/Core/Common/Src/svnrev.h
"#define SVN_REV_STR \"" ${DOLPHIN_WC_REVISION} "-" ${CMAKE_BUILD_TYPE} "\"\n")
if(SCM_BRANCH_STR EQUAL "master")
set(DOLPHIN_WC_IS_MASTER "1")
else()
set(DOLPHIN_WC_IS_MASTER "0")
endif()
file(WRITE ${PROJECT_BINARY_DIR}/Source/Core/Common/Src/scmrev.h
"#define SCM_REV_STR \"" ${DOLPHIN_WC_REVISION} "\"\n"
"#define SCM_DESC_STR \"" ${DOLPHIN_WC_DESCRIBE} "\"\n"
"#define SCM_BRANCH_STR \"" ${DOLPHIN_WC_BRANCH} "\"\n"
"#define SCM_IS_MASTER " ${DOLPHIN_WC_IS_MASTER} "\n"
# "#define BUILD_TYPE_STR \"" ${CMAKE_BUILD_TYPE} "\"\n"
)
include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common/Src")