diff options
author | Allen Winter <allen.winter@kdab.com> | 2011-06-30 17:36:45 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2011-06-30 17:36:45 -0400 |
commit | d2b2c90a06bf1f4a21df196430d1f95856900410 (patch) | |
tree | aba9d2a48d7b2ac1e960e1b68218394524c7e6a8 /attic/modules/MacroWriteBasicCMakeVersionFile.cmake | |
parent | e15ffacc69242c89107afbfda6f8ece9f2b56633 (diff) | |
download | extra-cmake-modules-d2b2c90a06bf1f4a21df196430d1f95856900410.tar.gz extra-cmake-modules-d2b2c90a06bf1f4a21df196430d1f95856900410.tar.bz2 |
Move the modules, modules-test and systeminfo subdirs into 'attic'
Diffstat (limited to 'attic/modules/MacroWriteBasicCMakeVersionFile.cmake')
-rw-r--r-- | attic/modules/MacroWriteBasicCMakeVersionFile.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/attic/modules/MacroWriteBasicCMakeVersionFile.cmake b/attic/modules/MacroWriteBasicCMakeVersionFile.cmake new file mode 100644 index 00000000..6f9e4189 --- /dev/null +++ b/attic/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) |