Ignore:
Timestamp:
Apr 25, 2014, 1:10:38 PM (5 years ago)
Author:
nicos@…
Message:

cmake-1.0.tcl: set deployment target and sdk root variables according to user's system (ticket #41321)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/cmake-1.0.tcl

    r117705 r119436  
    117117        }
    118118        if {${configure.sdkroot} != ""} {
    119             configure.args-append -DCMAKE_OSX_SYSROOT="${configure.sdkroot}"
     119            configure.args-append -DCMAKE_OSX_SYSROOT="${configure.sdkroot}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${macosx_deployment_target}"
    120120        } else {
    121             # Witout this, cmake will choose an SDK and deployment target on its own.
    122             configure.args-append -DCMAKE_OSX_SYSROOT=/ -DCMAKE_OSX_DEPLOYMENT_TARGET=""
     121            # Without this, cmake will choose an SDK and deployment target on its own.
     122            if {[vercmp $xcodeversion 4.3] < 0} {
     123                set sdks_dir ${developer_dir}/SDKs
     124            } else {
     125                set sdks_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
     126            }
     127            if {$macosx_deployment_target eq "10.4"} {
     128                set sdk ${sdks_dir}/MacOSX10.4u.sdk
     129            } else {
     130                set sdk ${sdks_dir}/MacOSX${macosx_deployment_target}.sdk
     131            }
     132            configure.args-append \
     133                -DCMAKE_OSX_SYSROOT="${sdk}" \
     134                -DCMAKE_OSX_DEPLOYMENT_TARGET="${macosx_deployment_target}"
    123135        }
    124136    }
Note: See TracChangeset for help on using the changeset viewer.