PortGroup cmake
Bradley Giesbrecht
pixilla at macports.org
Mon Nov 5 10:46:02 PST 2012
Hi,
Changes in cmake 2.8.10 are causing problems for the cmake PortGroup.
Setting -DCMAKE_OSX_SYSROOT=/ is a problem. I believe cmake expects CMAKE_OSX_SYSROOT to be a path to an sdk.
cmake-1.0.tcl:
...
pre-configure {
...
configure.universal_args-append \
-DCMAKE_OSX_ARCHITECTURES=\"[join ${configure.universal_archs} \;]\"
if {${configure.sdkroot} != ""} {
configure.args-append -DCMAKE_OSX_SYSROOT="${configure.sdkroot}"
} else {
configure.args-append -DCMAKE_OSX_SYSROOT=/
}
}
...
The svn log for r78651 says:
...
cmake portgroup: set sysroot to / when an SDK is not needed (see #29008, #29452)
...
Would something like this be a safe replacement for the default "/":
if {[vercmp ${xcodeversion} 4.3] < 0} {
set sdks.path ${developer_dir}/SDKs
} else {
set sdks.path ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
}
set os.sdk ""
array set os.sdks {
8 10.4u
9 10.5
10 10.6
11 10.7
12 10.8
}
foreach {key value} [array get os.sdks] {
if {${key} == ${os.major}} {
set os.sdk ${value}
}
}
if {[file exists ${sdks.path}/MacOSX${os.sdk}.sdk]} {
configure.args-append -DCMAKE_OSX_SYSROOT:PATH=${sdks.path}/MacOSX${os.sdk}.sdk
} else {
configure.args-append -DCMAKE_OSX_SYSROOT:PATH=/
}
Regards,
Bradley Giesbrecht (pixilla)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20121105/106ffded/attachment-0001.p7s>
More information about the macports-dev
mailing list