diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-12-14 21:35:54 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-12-14 21:35:54 +0000 |
commit | bbe1d875e27f9d87fefa985d6a819cf931031be9 (patch) | |
tree | bacf636f4defeb5bce6a4b34ba6395bae58dc231 /modules/KDE4Macros.cmake | |
parent | 4c11eb8050bdfc8465f45700e4d0969337999e08 (diff) | |
download | extra-cmake-modules-bbe1d875e27f9d87fefa985d6a819cf931031be9.tar.gz extra-cmake-modules-bbe1d875e27f9d87fefa985d6a819cf931031be9.tar.bz2 |
-add a macro which helps with generating a find_package() conform <package>Version.cmake file
Alex
svn path=/trunk/KDE/kdelibs/; revision=896965
Diffstat (limited to 'modules/KDE4Macros.cmake')
-rw-r--r-- | modules/KDE4Macros.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index be4620a8..37195e87 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1,6 +1,6 @@ # for documentation look at FindKDE4Internal.cmake -# this file contains the following macros: +# this file contains the following macros (or functions): # KDE4_ADD_UI_FILES # KDE4_ADD_UI3_FILES # KDE4_ADD_KCFG_FILES @@ -21,6 +21,7 @@ # KDE4_CREATE_HANDBOOK # KDE4_ADD_APP_ICON # KDE4_CREATE_MANPAGE +# KDE4_CREATE_BASIC_CMAKE_VERSION_FILE (function) # Copyright (c) 2006, 2007, Alexander Neundorf, <neundorf@kde.org> # Copyright (c) 2006, 2007, Laurent Montel, <montel@kde.org> @@ -1133,6 +1134,14 @@ macro (KDE4_ADD_APP_ICON appsources pattern) endmacro (KDE4_ADD_APP_ICON) +function(KDE4_WRITE_BASIC_CMAKE_VERSION_FILE _filename _major _minor _patch) + set(PROJECT_VERSION_MAJOR ${_major}) + set(PROJECT_VERSION_MINOR ${_minor}) + set(PROJECT_VERSION_PATCH ${_patch}) + configure_file(${KDE4_MODULE_DIR}/kde4BasicFindPackageVersion.cmake.in "${_filename}" @ONLY) +endfunction(KDE4_WRITE_BASIC_CMAKE_VERSION_FILE _major _minor _patch) + + macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) message(FATAL_ERROR "_KDE4_EXPORT_LIBRARY_DEPENDENCIES() was an internal macro and has been removed again. Just remove the code which calls it, there is no substitute.") endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) |