| 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.35 2009/12/10 17:35:52 abcd Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.36 2009/12/10 19:58:42 abcd 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 | # |
| … | |
… | |
| 246 | -exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \ |
246 | -exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \ |
| 247 | || die "${LINENO}: failed to disable hardcoded settings" |
247 | || die "${LINENO}: failed to disable hardcoded settings" |
| 248 | |
248 | |
| 249 | # NOTE Append some useful summary here |
249 | # NOTE Append some useful summary here |
| 250 | cat >> CMakeLists.txt <<- _EOF_ |
250 | cat >> CMakeLists.txt <<- _EOF_ |
|
|
251 | |
| 251 | MESSAGE(STATUS "<<< Gentoo configuration >>> |
252 | MESSAGE(STATUS "<<< Gentoo configuration >>> |
| 252 | Build type: ${CMAKE_BUILD_TYPE} |
253 | Build type: ${CMAKE_BUILD_TYPE} |
| 253 | Install path: ${CMAKE_INSTALL_PREFIX}\n") |
254 | Install path: ${CMAKE_INSTALL_PREFIX}\n") |
| 254 | _EOF_ |
255 | _EOF_ |
| 255 | } |
256 | } |
| … | |
… | |
| 313 | SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) |
314 | SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE) |
| 314 | _EOF_ |
315 | _EOF_ |
| 315 | [[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" |
316 | [[ -n ${CMAKE_NO_COLOR} ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" |
| 316 | |
317 | |
| 317 | # Convert mycmakeargs to an array, for backwards compatibility |
318 | # Convert mycmakeargs to an array, for backwards compatibility |
| 318 | if [[ $(declare -p mycmakeargs) != "declare -a mycmakeargs="* ]]; then |
319 | if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then |
| 319 | mycmakeargs=(${mycmakeargs}) |
320 | mycmakeargs=(${mycmakeargs}) |
| 320 | fi |
321 | fi |
| 321 | |
322 | |
| 322 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
323 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
| 323 | |
324 | |