Link against CoreFoundation rather than Carbon

Currently qca links to the Carbon framework for building however the mac
specific code don't use any Carbon classes but CoreFoundation. This patch
aims to update the code and build script to link to the more generic
CoreFoundation framework which may also allow to build it on iOS (not
verified).

REVIEW: 121703
This commit is contained in:
Samuel Gaist 2015-04-22 13:06:26 +02:00 committed by Harald Sitter
parent 7207e6285e
commit 4fd11c444a
4 changed files with 3 additions and 17 deletions

View File

@ -271,7 +271,7 @@ Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}
endif()
if (APPLE)
find_package(Carbon REQUIRED)
find_package(CoreFoundation REQUIRED)
set(CMAKE_INSTALL_NAME_DIR ${QCA_LIBRARY_INSTALL_DIR})
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif (APPLE)

View File

@ -1,13 +0,0 @@
# Copyright (c) 2006, Benjamin Reed, <ranger@befunk.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(CMakeFindFrameworks)
CMAKE_FIND_FRAMEWORKS(Carbon)
if (Carbon_FRAMEWORKS)
set(CARBON_LIBRARY "-framework Carbon" CACHE FILEPATH "Carbon framework" FORCE)
set(CARBON_FOUND 1)
endif (Carbon_FRAMEWORKS)

View File

@ -148,8 +148,8 @@ if(WIN32)
endif(WIN32)
if(APPLE)
set(CARBON_LIBRARY_SECURITY "-framework Security")
TARGET_LINK_LIBRARIES(${QCA_LIB_NAME} ${CARBON_LIBRARY} ${CARBON_LIBRARY_SECURITY})
set(COREFOUNDATION_LIBRARY_SECURITY "-framework Security")
TARGET_LINK_LIBRARIES(${QCA_LIB_NAME} ${COREFOUNDATION_LIBRARY} ${COREFOUNDATION_LIBRARY_SECURITY})
endif(APPLE)
if(NOT ANDROID)

View File

@ -20,7 +20,6 @@
#include "qca_systemstore.h"
#include <Carbon/Carbon.h>
#include <Security/SecTrust.h>
#include <Security/SecCertificate.h>