| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 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.38 2009/12/18 10:49:55 zmedico Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.39 2009/12/22 22:52:52 scarabeus 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 | # |
| … | |
… | |
| 111 | |
111 | |
| 112 | # @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD |
112 | # @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD |
| 113 | # @DESCRIPTION: |
113 | # @DESCRIPTION: |
| 114 | # Set to enable in-source build. |
114 | # Set to enable in-source build. |
| 115 | |
115 | |
| 116 | # @ECLASS-VARIABLE: CMAKE_NO_COLOR |
|
|
| 117 | # @DESCRIPTION: |
|
|
| 118 | # Set to disable cmake output coloring. |
|
|
| 119 | |
|
|
| 120 | # @ECLASS-VARIABLE: CMAKE_VERBOSE |
116 | # @ECLASS-VARIABLE: CMAKE_VERBOSE |
| 121 | # @DESCRIPTION: |
117 | # @DESCRIPTION: |
| 122 | # Set to enable verbose messages during compilation. |
118 | # Set to enable verbose messages during compilation. |
| 123 | |
119 | |
| 124 | # @ECLASS-VARIABLE: CMAKE_BUILD_TYPE |
120 | # @ECLASS-VARIABLE: CMAKE_BUILD_TYPE |
| … | |
… | |
| 312 | local common_config=${T}/gentoo_common_config.cmake |
308 | local common_config=${T}/gentoo_common_config.cmake |
| 313 | local libdir=$(get_libdir) |
309 | local libdir=$(get_libdir) |
| 314 | cat > "${common_config}" <<- _EOF_ |
310 | cat > "${common_config}" <<- _EOF_ |
| 315 | SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) |
311 | SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) |
| 316 | _EOF_ |
312 | _EOF_ |
| 317 | [[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" |
313 | [[ -n ${NOCOLOR} ]] || echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" |
| 318 | |
314 | |
| 319 | # Convert mycmakeargs to an array, for backwards compatibility |
315 | # Convert mycmakeargs to an array, for backwards compatibility |
| 320 | # Make the array a local variable since <=portage-2.1.6.x does not |
316 | # Make the array a local variable since <=portage-2.1.6.x does not |
| 321 | # support global arrays (see bug #297255). |
317 | # support global arrays (see bug #297255). |
| 322 | if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then |
318 | if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then |