Update ios/macos framework modulemap and reference in CMakeLists

This commit is contained in:
Joseph Henry
2020-05-28 13:58:39 -07:00
parent af186f1cb2
commit 8dc2b3b4f2
2 changed files with 11 additions and 5 deletions

View File

@@ -257,13 +257,13 @@ file (GLOB libnatpmpSrcGlob
file (GLOB libminiupnpcSrcGlob file (GLOB libminiupnpcSrcGlob
${ZTO_SRC_DIR}/ext/miniupnpc/connecthostport.c ${ZTO_SRC_DIR}/ext/miniupnpc/connecthostport.c
${ZTO_SRC_DIR}/ext/miniupnpc/igd_desc_parse.c ${ZTO_SRC_DIR}/ext/miniupnpc/igd_desc_parse.c
${ZTO_SRC_DIR}/ext/miniupnpc/minisoap.c ${ZTO_SRC_DIR}/ext/miniupnpc/minisoap.c
${ZTO_SRC_DIR}/ext/miniupnpc/minissdpc.c ${ZTO_SRC_DIR}/ext/miniupnpc/minissdpc.c
${ZTO_SRC_DIR}/ext/miniupnpc/miniupnpc.c ${ZTO_SRC_DIR}/ext/miniupnpc/miniupnpc.c
${ZTO_SRC_DIR}/ext/miniupnpc/miniwget.c ${ZTO_SRC_DIR}/ext/miniupnpc/miniwget.c
${ZTO_SRC_DIR}/ext/miniupnpc/minixml.c ${ZTO_SRC_DIR}/ext/miniupnpc/minixml.c
${ZTO_SRC_DIR}/ext/miniupnpc/portlistingparse.c ${ZTO_SRC_DIR}/ext/miniupnpc/portlistingparse.c
${ZTO_SRC_DIR}/ext/miniupnpc/receivedata.c ${ZTO_SRC_DIR}/ext/miniupnpc/receivedata.c
${ZTO_SRC_DIR}/ext/miniupnpc/upnpcommands.c ${ZTO_SRC_DIR}/ext/miniupnpc/upnpcommands.c
${ZTO_SRC_DIR}/ext/miniupnpc/upnpdev.c ${ZTO_SRC_DIR}/ext/miniupnpc/upnpdev.c
@@ -465,6 +465,7 @@ endif ()
if (IN_XCODE) if (IN_XCODE)
include_directories (${frameworkHeaderGlob}) include_directories (${frameworkHeaderGlob})
add_library(${XCODE_FRAMEWORK_NAME} STATIC add_library(${XCODE_FRAMEWORK_NAME} STATIC
$<TARGET_OBJECTS:libzt_obj> $<TARGET_OBJECTS:libzt_obj>
$<TARGET_OBJECTS:zto_obj> $<TARGET_OBJECTS:zto_obj>
@@ -474,12 +475,17 @@ if (IN_XCODE)
${libztSrcGlob} ${libztSrcGlob}
${frameworkHeaderGlob}) ${frameworkHeaderGlob})
set_target_properties(${XCODE_FRAMEWORK_NAME} PROPERTIES ENABLE_BITCODE "YES")
set_target_properties(${XCODE_FRAMEWORK_NAME} PROPERTIES BITCODE_GENERATION_MODE bitcode)
target_compile_options( ${XCODE_FRAMEWORK_NAME} PUBLIC -fembed-bitcode )
target_link_libraries( ${XCODE_FRAMEWORK_NAME} PUBLIC -fembed-bitcode )
set_target_properties(${XCODE_FRAMEWORK_NAME} PROPERTIES set_target_properties(${XCODE_FRAMEWORK_NAME} PROPERTIES
FRAMEWORK TRUE FRAMEWORK TRUE
FRAMEWORK_VERSION A FRAMEWORK_VERSION A
DEFINES_MODULE TRUE DEFINES_MODULE TRUE
MACOSX_FRAMEWORK_IDENTIFIER com.cmake.${XCODE_FRAMEWORK_NAME} MACOSX_FRAMEWORK_IDENTIFIER com.cmake.${XCODE_FRAMEWORK_NAME}
MODULE_MAP "~/op/zt/libzt/libzt_experimental/ports/module.modulemap" MODULE_MAP "${PROJ_DIR}/ports/module.modulemap"
PUBLIC_HEADER "${frameworkHeaderGlob}" PUBLIC_HEADER "${frameworkHeaderGlob}"
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer" XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
) )

View File

@@ -1,5 +1,5 @@
framework module zt { framework module zt {
umbrella header "Xcode-Bridging-Header.h" umbrella header "ZeroTierSockets.h"
export * export *
module * { export * } module * { export * }