aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-08-30 12:56:52 +0200
committerStephen Kelly <steveire@gmail.com>2011-08-30 12:56:52 +0200
commitc1cbe554239c2a407dc66def59d57ec9912c9409 (patch)
tree5cb14c073ba8df48b8d839320888c949489dc43f
parent819cfc7d86f650a45a9e0d235d0bcbc2d58f72c6 (diff)
downloadextra-cmake-modules-c1cbe554239c2a407dc66def59d57ec9912c9409.tar.gz
extra-cmake-modules-c1cbe554239c2a407dc66def59d57ec9912c9409.tar.bz2
Write a version file too.
-rw-r--r--modules/ECMQtFramework.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/ECMQtFramework.cmake b/modules/ECMQtFramework.cmake
index 8a5c4575..4c7e0f2d 100644
--- a/modules/ECMQtFramework.cmake
+++ b/modules/ECMQtFramework.cmake
@@ -117,3 +117,13 @@ install(FILES
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
+
+STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
+
+file(WRITE
+ "${CMAKE_BINARY_DIR}/${PROJECT_NAME}_version.h"
+ "#ifndef ${PROJECT_NAME_UPPER}_VERSION_H\n"
+ "#define ${PROJECT_NAME_UPPER}_VERSION_H\n"
+ "#define ${PROJECT_NAME_UPPER}_VERSION \"${ECM_VERSION_STRING}\"\n"
+ "#endif\n"
+)