diff options
author | David Faure <faure@kde.org> | 2014-01-10 09:51:05 +0100 |
---|---|---|
committer | David Faure <faure@kde.org> | 2014-01-10 10:10:36 +0100 |
commit | 4a55cd63141e23d3c599c4071a5f882936c30e77 (patch) | |
tree | c2ebb889730504133d2998ab6ae26b5430789cd5 | |
parent | e7c402c292b2c5a467394657b4800f3d52495b5d (diff) | |
download | extra-cmake-modules-4a55cd63141e23d3c599c4071a5f882936c30e77.tar.gz extra-cmake-modules-4a55cd63141e23d3c599c4071a5f882936c30e77.tar.bz2 |
Rename ECM_VERSION_* to PROJECT_VERSION_* to avoid confusion with ECM's own version
This is all internal, doesn't change the API or effects of ecm_setup_version.
-rw-r--r-- | modules/ECMSetupVersion.cmake | 9 | ||||
-rw-r--r-- | modules/ECMVersionHeader.h.in | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/modules/ECMSetupVersion.cmake b/modules/ECMSetupVersion.cmake index 2ce761ad..6c3a9959 100644 --- a/modules/ECMSetupVersion.cmake +++ b/modules/ECMSetupVersion.cmake @@ -73,12 +73,13 @@ function(ECM_SETUP_VERSION _version) set(${ESV_VARIABLE_PREFIX}_SOVERSION ${ESV_SOVERSION}) set(${ESV_VARIABLE_PREFIX}_VERSION_STRING "${_version}") + set(PROJECT_VERSION_STRING "${${ESV_VARIABLE_PREFIX}_VERSION_STRING}") + set(PROJECT_VERSION_MAJOR "${${ESV_VARIABLE_PREFIX}_VERSION_MAJOR}") + set(PROJECT_VERSION_MINOR "${${ESV_VARIABLE_PREFIX}_VERSION_MINOR}") + set(PROJECT_VERSION_PATCH "${${ESV_VARIABLE_PREFIX}_VERSION_PATCH}") + if(ESV_VERSION_HEADER) set(PROJECT_NAME_UPPER "${ESV_VARIABLE_PREFIX}") - set(ECM_VERSION_STRING "${${ESV_VARIABLE_PREFIX}_VERSION_STRING}") - set(ECM_VERSION_MAJOR "${${ESV_VARIABLE_PREFIX}_VERSION_MAJOR}") - set(ECM_VERSION_MINOR "${${ESV_VARIABLE_PREFIX}_VERSION_MINOR}") - set(ECM_VERSION_PATCH "${${ESV_VARIABLE_PREFIX}_VERSION_PATCH}") configure_file("${ECM_MODULE_DIR}/ECMVersionHeader.h.in" "${ESV_VERSION_HEADER}") endif() diff --git a/modules/ECMVersionHeader.h.in b/modules/ECMVersionHeader.h.in index b929e4e8..19eb96c5 100644 --- a/modules/ECMVersionHeader.h.in +++ b/modules/ECMVersionHeader.h.in @@ -2,10 +2,10 @@ #ifndef @PROJECT_NAME_UPPER@_VERSION_H #define @PROJECT_NAME_UPPER@_VERSION_H -#define @PROJECT_NAME_UPPER@_VERSION_STRING "@ECM_VERSION_STRING@" -#define @PROJECT_NAME_UPPER@_VERSION_MAJOR @ECM_VERSION_MAJOR@ -#define @PROJECT_NAME_UPPER@_VERSION_MINOR @ECM_VERSION_MINOR@ -#define @PROJECT_NAME_UPPER@_VERSION_PATCH @ECM_VERSION_PATCH@ -#define @PROJECT_NAME_UPPER@_VERSION ((@ECM_VERSION_MAJOR@<<16)|(@ECM_VERSION_MINOR@<<8)|(@ECM_VERSION_PATCH@)) +#define @PROJECT_NAME_UPPER@_VERSION_STRING "@PROJECT_VERSION_STRING@" +#define @PROJECT_NAME_UPPER@_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define @PROJECT_NAME_UPPER@_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define @PROJECT_NAME_UPPER@_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define @PROJECT_NAME_UPPER@_VERSION ((@PROJECT_VERSION_MAJOR@<<16)|(@PROJECT_VERSION_MINOR@<<8)|(@PROJECT_VERSION_PATCH@)) #endif |