I am having some difficulties adding facebookSDK.framework into my xcode project using cmake? Here's what i have done up to now. But it doesn't seem to work
set (facebook_sdk_path ${CMAKE_HOME_DIRECTORY}/external/framework/facebook/ios)
message("adding facebookSDK" ${facebook_sdk_path})
target_link_libraries(${Target} "${facebook_sdk_path}/facebookSDK.framework/facebookSDK")
I believe we need to set the framework under "framework search paths" on the project settings, but I am not exactly too sure on how to do this.
found my solution: i used this macro i found from CMake and XCode: "cannot find interface declaration for 'NSObject'"
I ran into the same issue but Frank's answer didn't work for me. As it was mentioned on the post referenced, calling
TARGET_LINK_LIBRARIES
messes up theFRAMEWORK_SEARCH_PATHS
variable. In my case it finds FacebookSDK.framework but then generates linker errors for the rest of the frameworks included (e.g. UIKit, Foundation, etc.).My solution was simply copying FacebookSDK.framework to the XCode frameworks folders. Bear in mind you need to copy it to both iPhoneOS and iPhoneSimulator if you build for device and simulator. Currently, XCode7 and SDK9.0, those folders are:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/System/Library/Frameworks
Adding FacebookSDK.framework as usual works fine then: