[KDE/Mac] compiling/installing
Mojca Miklavec
mojca at macports.org
Tue Jul 29 01:51:13 PDT 2014
On Tue, Jul 29, 2014 at 10:24 AM, "René J.V. Bertin" wrote:
> Hi,
>
> I think I stumbled upon a more likely reason for the build issues evoked below. There's been a change in the cmake portgroup,
> registry/portgroups/636464737c420ea283d4ad483ea35193d9da591588cba9f1d1d4e56d8ff6912e-6789/cmake-1.0.tcl vs. registry/portgroups/75f5e1bbba3b966f499792f00c2d7f4a1d35c65f00a5600ebfa600fa36b276cf-6911/cmake-1.0.tcl :
>
> @@ -1,5 +1,5 @@
> # -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
> -# $Id: cmake-1.0.tcl 121112 2014-06-17 20:16:44Z mojca at macports.org $
> +# $Id: cmake-1.0.tcl 119436 2014-04-25 13:10:38Z nicos at macports.org $
> #
> # Copyright (c) 2009 Orville Bennett <illogical1 at gmail.com>
> # Copyright (c) 2010-2013 The MacPorts Project
> @@ -81,9 +81,12 @@
> # The environment variable CPPFLAGS is not considered by CMake.
> # (CMake upstream ticket #12928 "CMake silently ignores CPPFLAGS"
> # <http://www.cmake.org/Bug/view.php?id=12928>).
> - #
> - # But adding -I${prefix}/include to CFLAGS/CXXFLAGS is a bad idea.
> - # If any other flags are needed, we need to add them.
> + # Thus, we have to add them manually to the CFLAGS and CXXFLAGS in the
> + # pre-configure phase.
> + if {${configure.cppflags} ne ""} {
> + configure.cflags-append ${configure.cppflags}
> + configure.cxxflags-append ${configure.cppflags}
> + }
>
> # In addition, CMake provides build-type-specific flags for
> # Release (-O3 -DNDEBUG), Debug (-g), MinSizeRel (-Os -DNDEBUG), and
>
> This ought at least explain the failures to find headerfiles in /opt/local/include mentioned by bkn at ithryn.net .
You "reversed" the direction of the commit
(http://trac.macports.org/changeset/121112), but adding
configure.cppflags is certainly not acceptable as it causes way too
many headaches.
Does it help if you add -DCMAKE_INCLUDE_PATH=${prefix}/include? (I'm
not 100% sure if that's the right variable.)
We were discussion replacing "cppflags=-I${prefix}/include" with a
variable with a list of include paths. Then CMake or any other build
system could convert that list into its own format.
For example
configure.includedirs-append ${prefix}/include/somelib
could end up as
-DCMAKE_INCLUDE_PATH=${prefix}/include/somelib...
in CMake and as something else in another system.
Mojca
More information about the macports-users
mailing list