Merge pull request #279 from terziman/master

Fixed bug during compilation with mingw
pull/280/head
Alexander Gessler 2014-05-19 19:27:10 +02:00
commit 279a97872a
4 changed files with 32 additions and 4 deletions

View File

@ -7,10 +7,37 @@ set (ASSIMP_VERSION_MINOR 0)
set (ASSIMP_VERSION_PATCH 1) # subversion revision?
set (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
set (ASSIMP_SOVERSION 3)
SET ( PROJECT_VERSION "${ASSIMP_VERSION}" )
set (PROJECT_VERSION "${ASSIMP_VERSION}")
set(ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources")
# Get the current working branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GIT_COMMIT_HASH)
set(GIT_COMMIT_HASH 0)
endif(NOT GIT_COMMIT_HASH)
configure_file(
${CMAKE_SOURCE_DIR}/revision.h.in
${CMAKE_BINARY_DIR}/revision.h
)
include_directories(${CMAKE_BINARY_DIR})
option(ASSIMP_OPT_BUILD_PACKAGES "Set to ON to generate CPack configuration files and packaging targets" OFF)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules" )
set(LIBASSIMP_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH}" )

View File

@ -63,7 +63,7 @@ ASSIMP_API unsigned int aiGetCompileFlags () {
}
// include current build revision, which is even updated from time to time -- :-)
#include "../revision.h"
#include "revision.h"
// ------------------------------------------------------------------------------------------------
ASSIMP_API unsigned int aiGetVersionRevision ()

View File

@ -1,6 +1,7 @@
#ifndef ASSIMP_REVISION_H_INC
#define ASSIMP_REVISION_H_INC
#define GitVersion 0xA0bA3A8;
#define GitVersion 0x@GIT_COMMIT_HASH@
#define GitBranch "@GIT_BRANCH@"
#endif // ASSIMP_REVISION_H_INC

View File

@ -51,7 +51,7 @@ const char* AICMD_MSG_ABOUT =
" -- Commandline toolchain --\n"
"------------------------------------------------------ \n\n"
"Version %i.%i %s%s%s%s%s(SVNREV %i)\n\n";
"Version %i.%i %s%s%s%s%s(GIT commit %x)\n\n";
const char* AICMD_MSG_HELP =
"assimp <verb> <parameters>\n\n"