diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-12-14 23:11:35 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-12-14 23:11:35 +0000 |
commit | 728a5895ce2bd160b3a8748ee15711d942d62ebb (patch) | |
tree | f4783c340a4f48b09d9d6ff366d55b599e2a4ebf /modules/MacroWriteBasicCMakeVersionFile.cmake | |
parent | d6452721669defdbf81eb43cdab8e08b4ef43ed7 (diff) | |
download | extra-cmake-modules-728a5895ce2bd160b3a8748ee15711d942d62ebb.tar.gz extra-cmake-modules-728a5895ce2bd160b3a8748ee15711d942d62ebb.tar.bz2 |
-rename the new kde4_write_basic_cmake_version_file() to macro_write_basic_cmake_version_file(), since
it is completely KDE-independent and can potentially be used in any other project
remove the old macro, add the new renamed one, add it to the macro library, adjust kdepimlibs/CMakeLists.txt accordingly
Alex
svn path=/trunk/KDE/kdelibs/; revision=896999
Diffstat (limited to 'modules/MacroWriteBasicCMakeVersionFile.cmake')
-rw-r--r-- | modules/MacroWriteBasicCMakeVersionFile.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/MacroWriteBasicCMakeVersionFile.cmake b/modules/MacroWriteBasicCMakeVersionFile.cmake new file mode 100644 index 00000000..6f9e4189 --- /dev/null +++ b/modules/MacroWriteBasicCMakeVersionFile.cmake @@ -0,0 +1,22 @@ +# MACRO_WRITE_BASIC_CMAKE_VERSION_FILE( _filename _major _minor _patch) +# Writes a file for use as <package>ConfigVersion.cmake file to <_filename>. +# See the documentation of FIND_PACKAGE() for details on this. +# _filename is the output filename, it should be in the build tree. +# _major is the major version number of the project to be installed +# _minor is the minor version number of the project to be installed +# _patch is the patch version number of the project to be installed +# + +# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +get_filename_component(_currentListFileDir ${CMAKE_CURRENT_LIST_FILE} PATH) + +function(MACRO_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(${_currentListFileDir}/BasicFindPackageVersion.cmake.in "${_filename}" @ONLY) +endfunction(MACRO_WRITE_BASIC_CMAKE_VERSION_FILE _major _minor _patch) |