File: MacroWriteBasicCMakeVersionFile.cmake

package info (click to toggle)
telepathy-qt 0.9.7-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,000 kB
  • sloc: cpp: 74,497; xml: 34,294; ansic: 20,741; python: 3,983; sh: 118; makefile: 18
file content (21 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#  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>
# Copyright (c) 2010, Collabora Ltd., <http://www.collabora.co.uk/>
#
# 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 _version)
   set(PROJECT_VERSION_FULL ${_version})
   configure_file(${_currentListFileDir}/BasicFindPackageVersion.cmake.in "${_filename}" @ONLY)
endfunction(MACRO_WRITE_BASIC_CMAKE_VERSION_FILE _major _minor _patch)