Skip to content

Commit 6a0c174

Browse files
committed
Merge pull request #769 from hashdist/cmake_osx
Fix CMake on OSX 10.10
2 parents c0fde54 + 9aed126 commit 6a0c174

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

base/cmake_package.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ def configure(ctx, stage_args):
3434
else:
3535
conf_lines.append('-DCMAKE_BUILD_TYPE:STRING=Release')
3636

37+
if ctx.parameters['platform'] == 'Darwin':
38+
conf_lines.append('-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=""')
39+
3740
#cmake needs to be given all the dependency dirs as prefix paths
3841
#so that we search the hashdist directories before the system directories
3942
#CMake doesn't use the CPPFLAGS implicitly to find libraries

pkgs/cmake.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
11
extends: [autotools_package]
22

3+
dependencies:
4+
build: [zlib, bzip2, curl, openssl, libidn, expat]
5+
36
sources:
4-
- key: tar.gz:kcrzjtzo7wnjfxkbctv6fgmurgmezzxg
5-
url: http://www.cmake.org/files/v3.2/cmake-3.2.0-rc1.tar.gz
7+
- key: tar.gz:vxuu43rwaodxivs7flwyqzsbkrbuit5x
8+
url: http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
69

710
build_stages:
11+
- when: platform == 'Darwin'
12+
name: fix_deployment_target
13+
after: prologue
14+
before: configure
15+
handler: bash
16+
bash: |
17+
unset MACOSX_DEPLOYMENT_TARGET
18+
819
- name: configure
9-
extra: ['--parallel=${HASHDIST_CPU_COUNT}']
20+
extra: ['--parallel=${HASHDIST_CPU_COUNT}',
21+
'--system-bzip2',
22+
'--system-curl',
23+
'--system-expat',
24+
#'--system-jsoncpp',
25+
#'--system-libarchive',
26+
'--system-zlib',
27+
'--',
28+
'-DCMAKE_PREFIX_PATH=${CURL_DIR}/lib;${ZLIB_DIR}/lib;${BZIP2_DIR}/lib;${EXPAT_DIR}/lib',
29+
'-DCURL_INCLUDE_DIR=${CURL_DIR}/include',
30+
'-DZLIB_INCLUDE_DIR=${ZLIB_DIR}/include',
31+
'-DBZIP2_INCLUDE_DIR=${BZIP2_DIR}/include',
32+
'-DEXPAT_INCLUDE_DIR=${EXPAT_DIR}/include',
33+
]
1034

1135
when_build_dependency:
1236
- set: CMAKE

0 commit comments

Comments
 (0)