cmake/VersionScript.cmake
author Tero Marttila <terom@fixme.fi>
Tue, 27 Jan 2009 00:25:58 +0200
changeset 439 9823e6cd1086
parent 402 ce1e536ec897
permissions -rw-r--r--
some README text
# location of output file is given as PROJECT_VERSION_FILE

# include cmake stuff
include ("cmake/FindVersion.cmake")
include ("cmake/FindTimestamp.cmake")

# determine PROJECT_VERSION
FindProjectVersion ("${CMAKE_SOURCE_DIR}")

# build date
FindBuildTimestamp ()

# create version.c
CONFIGURE_FILE (
    "${CMAKE_SOURCE_DIR}/src/version.c.in" "${PROJECT_VERSION_FILE}" @ONLY
)