From bbe1d875e27f9d87fefa985d6a819cf931031be9 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 14 Dec 2008 21:35:54 +0000 Subject: -add a macro which helps with generating a find_package() conform Version.cmake file Alex svn path=/trunk/KDE/kdelibs/; revision=896965 --- modules/KDE4Macros.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules/KDE4Macros.cmake') 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, # Copyright (c) 2006, 2007, Laurent Montel, @@ -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) -- cgit v1.2.1