Skip to content

Commit

Permalink
- fix iOS CMake architecture
Browse files Browse the repository at this point in the history
Signed-off-by: SSE4 <[email protected]>
  • Loading branch information
SSE4 committed Jun 6, 2020
1 parent b963b4d commit d30579e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions conans/client/build/cmake_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ def get_definitions(self):
definitions.update(build_type_definition(self._forced_build_type, build_type,
self._generator, self._output))

if str(os_) == "Macos":
if arch == "x86":
definitions["CMAKE_OSX_ARCHITECTURES"] = "i386"
if tools.is_apple_os(os_):
definitions["CMAKE_OSX_ARCHITECTURES"] = tools.to_apple_arch(arch)
definitions["CMAKE_OSX_SYSROOT"] = tools.XCRun(self._conanfile.settings).sdk_path

definitions.update(self._cmake_cross_build_defines())
definitions.update(self._get_cpp_standard_vars())
Expand Down
2 changes: 1 addition & 1 deletion conans/test/unittests/client/build/cmake_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ def install_definitions_test(self):
("iOS", "7.0",),
("watchOS", "4.0",),
("tvOS", "11.0",)])
@mock.patch('platform.system', return_value="Macos")
@mock.patch("conans.client.tools.apple.XCRun.sdk_path", return_value='/opt')
def test_cmake_system_version_osx(self, the_os, os_version, _):
settings = Settings.loads(get_default_settings_yml())
settings.os = the_os
Expand Down

0 comments on commit d30579e

Please sign in to comment.