diff --git a/LinkHifiShared.cmake b/LinkHifiShared.cmake index de6f0875ef..3735589807 100644 --- a/LinkHifiShared.cmake +++ b/LinkHifiShared.cmake @@ -7,4 +7,9 @@ MACRO(LINK_HIFI_SHARED_LIBRARY TARGET) get_directory_property(HIFI_SHARED_LIBRARY DIRECTORY ../shared DEFINITION HIFI_SHARED_LIBRARY) add_dependencies(${TARGET} ${HIFI_SHARED_LIBRARY}) target_link_libraries(${TARGET} ${HIFI_SHARED_LIBRARY}) + + if (APPLE) + # link in required OS X framework + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework CoreServices") + endif (APPLE) ENDMACRO(LINK_HIFI_SHARED_LIBRARY _target) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index b440c3ec48..3526224148 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -10,7 +10,7 @@ project(interface) if (APPLE) # link in required OS X frameworks and include the right GL headers - set(CMAKE_EXE_LINKER_FLAGS "-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreServices -framework Carbon -framework GLUT") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreServices -framework Carbon -framework GLUT") set(GL_HEADERS "#include \n#include ") else (APPLE) # include the right GL headers for UNIX diff --git a/shared/src/SharedUtil.cpp b/shared/src/SharedUtil.cpp index 72dca7277a..740e6f6cfb 100644 --- a/shared/src/SharedUtil.cpp +++ b/shared/src/SharedUtil.cpp @@ -66,13 +66,11 @@ void switchToResourcesIfRequired() { CFBundleRef mainBundle = CFBundleGetMainBundle(); CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); char path[PATH_MAX]; - if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX)) // Error: expected unqualified-id before 'if' - { + if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX)) { // error! } - CFRelease(resourcesURL); // error: expected constructor, destructor or type conversion before '(' token + CFRelease(resourcesURL); - chdir(path); // error: expected constructor, destructor or type conversion before '(' token - std::cout << "Current Path: " << path << std::endl; // error: expected constructor, destructor or type conversion before '<<' token + chdir(path); #endif } \ No newline at end of file