Removed most usage of Carbon in favour of CoreFoundation

This commit is contained in:
Sean McBride 2010-08-17 16:11:33 -04:00 committed by David Cole
parent 76976a59e9
commit 0037dcb6af
6 changed files with 15 additions and 16 deletions

View File

@ -343,7 +343,7 @@ TARGET_LINK_LIBRARIES(CMakeLib cmsys
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
${CMAKE_CURL_LIBRARIES} )
# On Apple we need Carbon
# On Apple we need CoreFoundation
IF(APPLE)
TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation")
ENDIF(APPLE)
@ -465,7 +465,7 @@ IF(APPLE)
ADD_EXECUTABLE(OSXScriptLauncher
CPack/OSXScriptLauncher.cxx)
TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys)
TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework Carbon")
TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework CoreFoundation")
ENDIF(APPLE)
# Build CMake executable

View File

@ -14,7 +14,6 @@
#include <cmsys/ios/fstream>
#include <cmsys/ios/iostream>
#include <Carbon/Carbon.h>
#include <CoreFoundation/CoreFoundation.h>
// For the PATH_MAX constant

View File

@ -3,7 +3,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <Carbon/Carbon.h>
#include <CoreFoundation/CoreFoundation.h>
int fileExists(char* filename)
{
@ -51,7 +51,7 @@ int findBundleFile(char* exec, const char* file)
int foo(char *exec)
{
// Call a "Carbon" function...
// Call a CoreFoundation function...
//
CFBundleRef br = CFBundleGetMainBundle();
(void) br;

View File

@ -1,6 +1,6 @@
#include <stdio.h>
#include <Carbon/Carbon.h>
#include <CoreFoundation/CoreFoundation.h>
extern int foo(char* exec);
@ -8,8 +8,8 @@ int main(int argc, char* argv[])
{
printf("Started with: %d arguments\n", argc);
// Call a "Carbon" function... but pull in the link dependency on "-framework
// Carbon" via CMake's dependency chaining mechanism. This code exists to
// Call a CoreFoundation function... but pull in the link dependency on "-framework
// CoreFoundation" via CMake's dependency chaining mechanism. This code exists to
// verify that the chaining mechanism works with "-framework blah" style
// link dependencies.
//

View File

@ -25,14 +25,14 @@ SET_SOURCE_FILES_PROPERTIES(
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
# Test building a bundle linking to a shared library where the
# shared library links to Carbon, but the executable does not
# explicitly link to Carbon, but the executable does *depend*
# on Carbon. There should be a link failure for the executable
# shared library links to CoreFoundation, but the executable does not
# explicitly link to CoreFoundation, but the executable does *depend*
# on CoreFoundation. There should be a link failure for the executable
# if CMake's dependency chaining for libraries with "-framework
# blah" style dependencies gets broken...
#
ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
TARGET_LINK_LIBRARIES(BundleTestLib "-framework Carbon")
TARGET_LINK_LIBRARIES(BundleTestLib "-framework CoreFoundation")
ADD_EXECUTABLE(BundleTest
MACOSX_BUNDLE
@ -43,8 +43,8 @@ ADD_EXECUTABLE(BundleTest
)
TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
#
# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework Carbon")
# (see above comments about Carbon)
# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework CoreFoundation")
# (see above comments about CoreFoundation)
#
# Test bundle installation.

View File

@ -666,9 +666,9 @@ if ${cmake_system_cygwin}; then
cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import"
fi
# Add Carbon framework on Darwin
# Add CoreFoundation framework on Darwin
if ${cmake_system_darwin}; then
cmake_ld_flags="${LDFLAGS} -framework Carbon"
cmake_ld_flags="${LDFLAGS} -framework CoreFoundation"
fi
# Add BeOS toolkits...