From 55edcf22e59faa49f17d17afbed90738f7c49062 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Wed, 2 Aug 2017 07:12:31 +0300 Subject: [PATCH] Enable ARC when configuring the project via CMake --- macosx/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macosx/CMakeLists.txt b/macosx/CMakeLists.txt index 1cf1b137b..bbc5997d6 100644 --- a/macosx/CMakeLists.txt +++ b/macosx/CMakeLists.txt @@ -1,5 +1,11 @@ project(trmac) +if(CMAKE_GENERATOR STREQUAL "Xcode") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC ON) +else() + add_definitions(-fobjc-arc) +endif() + find_program(IBTOOL_EXECUTABLE ibtool REQUIRED) find_program(TIFFUTIL_EXECUTABLE tiffutil REQUIRED) find_program(INSTALL_NAME_TOOL_EXECUTABLE install_name_tool REQUIRED)