| 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.57 2010/08/12 19:27:42 reavertm Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.58 2010/08/13 05:02:49 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) |
| 29 | WANT_CMAKE="${WANT_CMAKE:-always}" |
29 | WANT_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 required CMake version. Default is 2.6.2-r1 |
33 | # Specify the minimum allowable version of cmake. Defaults to 2.6.2-r1 |
| 34 | CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}" |
34 | CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.6.2-r1}" |
| 35 | |
35 | |
| 36 | CMAKEDEPEND="" |
36 | CMAKEDEPEND="" |
| 37 | case ${WANT_CMAKE} in |
37 | case ${WANT_CMAKE} in |
| 38 | always) |
38 | always) |
| … | |
… | |
| 284 | # Fix xdg collision with sandbox |
284 | # Fix xdg collision with sandbox |
| 285 | export XDG_CONFIG_HOME="${T}" |
285 | export XDG_CONFIG_HOME="${T}" |
| 286 | |
286 | |
| 287 | # @SEE CMAKE_BUILD_TYPE |
287 | # @SEE CMAKE_BUILD_TYPE |
| 288 | if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then |
288 | if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then |
| 289 | # Handle debug and release codepaths |
289 | # Handle release builds |
| 290 | if has debug ${IUSE//+} && use debug; then |
290 | if ! has debug ${IUSE//+} || ! use debug; then |
| 291 | append-cppflags -DDEBUG |
291 | append-cppflags -DNDEBUG |
| 292 | else |
|
|
| 293 | append-cppflags -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM |
|
|
| 294 | fi |
292 | fi |
| 295 | fi |
293 | fi |
| 296 | |
294 | |
| 297 | # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS) |
295 | # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS) |
| 298 | local build_rules=${T}/gentoo_rules.cmake |
296 | local build_rules=${T}/gentoo_rules.cmake |