1
0
Fork 0

Fixed CMake version.h, config.h creation

This commit is contained in:
James Turner 2011-01-01 21:46:16 +00:00
parent 61c88af564
commit 4428b7358c
3 changed files with 14 additions and 6 deletions

View file

@ -8,7 +8,9 @@ include (CPack)
project(FlightGear) project(FlightGear)
file(READ version FLIGHTGEAR_VERSION) # read 'version' file into a variable (stripping any newlines or spaces)
file(READ version versionFile)
string(STRIP ${versionFile} FLIGHTGEAR_VERSION)
#packaging #packaging
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING") SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
@ -178,6 +180,10 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
${PLIB_INCLUDE_DIR} ) ${PLIB_INCLUDE_DIR} )
include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${PROJECT_SOURCE_DIR}/src)
# following is needed, because config.h is include 'bare', whereas
# version.h is included as <Include/version.h> - this should be cleaned up
include_directories(${PROJECT_BINARY_DIR}/src)
include_directories(${PROJECT_BINARY_DIR}/src/Include) include_directories(${PROJECT_BINARY_DIR}/src/Include)
add_definitions(-DHAVE_CONFIG_H) add_definitions(-DHAVE_CONFIG_H)

View file

@ -19,7 +19,7 @@
#cmakedefine HAVE_SYS_TIME_H #cmakedefine HAVE_SYS_TIME_H
#cmakedefine HAVE_CULLSETTINGS_CLEAR_MASK #cmakedefine HAVE_CULLSETTINGS_CLEAR_MASK
#define VERSION "@FLIGHTGEAR_VERSION" #define VERSION "@FLIGHTGEAR_VERSION@"
#define HAVE_VERSION_H 1 // version.h is assumed for CMake builds #define HAVE_VERSION_H 1 // version.h is assumed for CMake builds

View file

@ -1,8 +1,10 @@
#cmakedefine FLIGHTGEAR_VERSION #define FLIGHTGEAR_VERSION "@FLIGHTGEAR_VERSION@"
#define HUDSON_BUILD_NUMBER @HUDSON_BUILD_NUMBER@
#define HUDSON_BUILD_ID "@HUDSON_BUILD_ID@"
#define REVISION "@REVISION@"
#cmakedefine HUDSON_BUILD_NUMBER
#cmakedefine HUDSON_BUILD_ID
#cmakedefine REVISION