0

Earlier, I was building SHARED library as Framework Bundle on the macOS and iOS.

CmakeLists :

add_library(${TARGET_CLIENT_OBJC_LIB_NAME} SHARED
${DIR_SRCS}
${sources}
${headers}
${objc_sources})

set_target_properties(${TARGET_CLIENT_OBJC_LIB_NAME} PROPERTIES
FRAMEWORK TRUE
FRAMEWORK_VERSION C
PUBLIC_HEADER ${headers}
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
MACOSX_FRAMEWORK_IDENTIFIER Dummy
MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist)

for this, It created library named "Dummy" of size 21 MB and Now,Instead of SHARED, I want to have a STATIC Library so I just changed it to add_library(${TARGET_CLIENT_OBJC_LIB_NAME} STATIC. Ideally for this, It should have created libDummy.a library file in my framework but still getting "Dummy" library only, but of size 61MB. Is there any way I can check whether the generated library is Shared or Static ??

TheBlank
  • 3
  • 2
  • By setting the property `FRAMEWORK TRUE` on the target you force the compiler to generate a framework bundle. You can create static as well as dynamic framework bundles on iOS and macOS. The name of the framework bundle is the same: `${TARGET_CLIENT_OBJC_LIB_NAME}.framework`. See [here](https://stackoverflow.com/questions/32591878/ios-is-it-a-static-or-a-dynamic-framework) how to find out of which type your framework is. – vre Jan 17 '22 at 15:17

0 Answers0