/[gentoo-x86]/eclass/cmake-utils.eclass
Gentoo

Diff of /eclass/cmake-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.55 Revision 1.59
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.55 2010/07/09 16:31:27 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.59 2010/09/16 16:04:11 reavertm Exp $
4 4
5# @ECLASS: cmake-utils.eclass 5# @ECLASS: cmake-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# 8#
28# used for optionality) 28# used for optionality)
29WANT_CMAKE="${WANT_CMAKE:-always}" 29WANT_CMAKE="${WANT_CMAKE:-always}"
30 30
31# @ECLASS-VARIABLE: CMAKE_MIN_VERSION 31# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
32# @DESCRIPTION: 32# @DESCRIPTION:
33# Specify the minimum allowable version of cmake. Defaults to 2.6.2-r1 33# Specify the minimum required CMake version. Default is 2.6.2-r1
34CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}" 34CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}"
35 35
36CMAKEDEPEND="" 36CMAKEDEPEND=""
37case ${WANT_CMAKE} in 37case ${WANT_CMAKE} in
38 always) 38 always)
142_check_build_dir() { 142_check_build_dir() {
143 : ${CMAKE_USE_DIR:=${S}} 143 : ${CMAKE_USE_DIR:=${S}}
144 if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then 144 if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
145 # we build in source dir 145 # we build in source dir
146 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}" 146 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
147 elif [[ ${CMAKE_USE_DIR} = ${WORKDIR} ]]; then
148 # out of tree build, but with $S=$WORKDIR, see bug #273949 for reason.
149 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}/build"
150 else 147 else
151 # regular out of tree build 148 : ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
152 [[ ${1} = init || -d ${CMAKE_USE_DIR}_build ]] && SUF="_build" || SUF=""
153 CMAKE_BUILD_DIR="${CMAKE_USE_DIR}${SUF}"
154 fi 149 fi
155 echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\"" 150 echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
156} 151}
157# @FUNCTION: cmake-utils_use_with 152# @FUNCTION: cmake-utils_use_with
158# @USAGE: <USE flag> [flag name] 153# @USAGE: <USE flag> [flag name]
214# Based on use_enable. See ebuild(5). 209# Based on use_enable. See ebuild(5).
215# 210#
216# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled 211# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
217# and -DHAVE_FOO=OFF if it is disabled. 212# and -DHAVE_FOO=OFF if it is disabled.
218cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; } 213cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
214
215# @FUNCTION: cmake-utils_use_use
216# @USAGE: <USE flag> [flag name]
217# @DESCRIPTION:
218# Based on use_enable. See ebuild(5).
219#
220# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
221# and -DUSE_FOO=OFF if it is disabled.
222cmake-utils_use_use() { _use_me_now USE_ "$@" ; }
219 223
220# @FUNCTION: cmake-utils_use 224# @FUNCTION: cmake-utils_use
221# @USAGE: <USE flag> [flag name] 225# @USAGE: <USE flag> [flag name]
222# @DESCRIPTION: 226# @DESCRIPTION:
223# Based on use_enable. See ebuild(5). 227# Based on use_enable. See ebuild(5).

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.20