Skip to content

How Can we able to add frameworks using cmakelist file ? #1090

Closed Answered by rh101
arungowda09 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it's possible, and as an example:

target_link_libraries(${APP_NAME}
    "-framework MediaPlayer"
    "-framework StoreKit"
    )

Also, if you need an entitlements file to enable certain features and such, then let Xcode generate that file, then add that file to your project folder, and in CMakeLists.txt, add XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS to the set_target_properties, like this:

set_target_properties(${APP_NAME} PROPERTIES
    RESOURCE "${APP_UI_RES}"
    XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_LIST_DIR}/YourEntitlementFile.entitlements"
    XCODE_ATTRIBUTE_ENABLE_IN_APP_PURCHASE "YES"
    )

As you can see above, you can also add XCODE_ATTRIBUTE_ENABLE_IN_AP…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@arungowda09
Comment options

@rh101
Comment options

rh101 Mar 1, 2023
Collaborator

Answer selected by arungowda09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants