Removed most usage of Carbon in favour of CoreFoundation
This commit is contained in:
parent
76976a59e9
commit
0037dcb6af
|
@ -343,7 +343,7 @@ TARGET_LINK_LIBRARIES(CMakeLib cmsys
|
||||||
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
|
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
|
||||||
${CMAKE_CURL_LIBRARIES} )
|
${CMAKE_CURL_LIBRARIES} )
|
||||||
|
|
||||||
# On Apple we need Carbon
|
# On Apple we need CoreFoundation
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation")
|
TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation")
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
@ -465,7 +465,7 @@ IF(APPLE)
|
||||||
ADD_EXECUTABLE(OSXScriptLauncher
|
ADD_EXECUTABLE(OSXScriptLauncher
|
||||||
CPack/OSXScriptLauncher.cxx)
|
CPack/OSXScriptLauncher.cxx)
|
||||||
TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys)
|
TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys)
|
||||||
TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework Carbon")
|
TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework CoreFoundation")
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
# Build CMake executable
|
# Build CMake executable
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include <cmsys/ios/fstream>
|
#include <cmsys/ios/fstream>
|
||||||
#include <cmsys/ios/iostream>
|
#include <cmsys/ios/iostream>
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
|
||||||
// For the PATH_MAX constant
|
// For the PATH_MAX constant
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
|
||||||
int fileExists(char* filename)
|
int fileExists(char* filename)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ int findBundleFile(char* exec, const char* file)
|
||||||
|
|
||||||
int foo(char *exec)
|
int foo(char *exec)
|
||||||
{
|
{
|
||||||
// Call a "Carbon" function...
|
// Call a CoreFoundation function...
|
||||||
//
|
//
|
||||||
CFBundleRef br = CFBundleGetMainBundle();
|
CFBundleRef br = CFBundleGetMainBundle();
|
||||||
(void) br;
|
(void) br;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
|
||||||
extern int foo(char* exec);
|
extern int foo(char* exec);
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
printf("Started with: %d arguments\n", argc);
|
printf("Started with: %d arguments\n", argc);
|
||||||
|
|
||||||
// Call a "Carbon" function... but pull in the link dependency on "-framework
|
// Call a CoreFoundation function... but pull in the link dependency on "-framework
|
||||||
// Carbon" via CMake's dependency chaining mechanism. This code exists to
|
// CoreFoundation" via CMake's dependency chaining mechanism. This code exists to
|
||||||
// verify that the chaining mechanism works with "-framework blah" style
|
// verify that the chaining mechanism works with "-framework blah" style
|
||||||
// link dependencies.
|
// link dependencies.
|
||||||
//
|
//
|
||||||
|
|
|
@ -25,14 +25,14 @@ SET_SOURCE_FILES_PROPERTIES(
|
||||||
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
|
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
|
||||||
|
|
||||||
# Test building a bundle linking to a shared library where the
|
# Test building a bundle linking to a shared library where the
|
||||||
# shared library links to Carbon, but the executable does not
|
# shared library links to CoreFoundation, but the executable does not
|
||||||
# explicitly link to Carbon, but the executable does *depend*
|
# explicitly link to CoreFoundation, but the executable does *depend*
|
||||||
# on Carbon. There should be a link failure for the executable
|
# on CoreFoundation. There should be a link failure for the executable
|
||||||
# if CMake's dependency chaining for libraries with "-framework
|
# if CMake's dependency chaining for libraries with "-framework
|
||||||
# blah" style dependencies gets broken...
|
# blah" style dependencies gets broken...
|
||||||
#
|
#
|
||||||
ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
|
ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
|
||||||
TARGET_LINK_LIBRARIES(BundleTestLib "-framework Carbon")
|
TARGET_LINK_LIBRARIES(BundleTestLib "-framework CoreFoundation")
|
||||||
|
|
||||||
ADD_EXECUTABLE(BundleTest
|
ADD_EXECUTABLE(BundleTest
|
||||||
MACOSX_BUNDLE
|
MACOSX_BUNDLE
|
||||||
|
@ -43,8 +43,8 @@ ADD_EXECUTABLE(BundleTest
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
|
TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
|
||||||
#
|
#
|
||||||
# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework Carbon")
|
# DO NOT: TARGET_LINK_LIBRARIES(BundleTest "-framework CoreFoundation")
|
||||||
# (see above comments about Carbon)
|
# (see above comments about CoreFoundation)
|
||||||
#
|
#
|
||||||
|
|
||||||
# Test bundle installation.
|
# Test bundle installation.
|
||||||
|
|
|
@ -666,9 +666,9 @@ if ${cmake_system_cygwin}; then
|
||||||
cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import"
|
cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add Carbon framework on Darwin
|
# Add CoreFoundation framework on Darwin
|
||||||
if ${cmake_system_darwin}; then
|
if ${cmake_system_darwin}; then
|
||||||
cmake_ld_flags="${LDFLAGS} -framework Carbon"
|
cmake_ld_flags="${LDFLAGS} -framework CoreFoundation"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add BeOS toolkits...
|
# Add BeOS toolkits...
|
||||||
|
|
Loading…
Reference in New Issue