mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Start generating embedded Info.plist files for Swift dylibs.
Swift SVN r16511
This commit is contained in:
@@ -683,6 +683,28 @@ macro(add_swift_library name)
|
||||
INSTALL_NAME_DIR "@rpath"
|
||||
BUILD_WITH_INSTALL_RPATH YES)
|
||||
endif()
|
||||
|
||||
# Configure plist creation for OS X.
|
||||
set (PLIST_INFO_PLIST "Info.plist" CACHE STRING "Plist name")
|
||||
if (APPLE AND SHARED_LIBRARY)
|
||||
set(PLIST_INFO_NAME ${name})
|
||||
set(PLIST_INFO_UTI "com.apple.dt.${name}")
|
||||
set(PLIST_INFO_VERSION "1.0")
|
||||
if (LLVM_SUBMIT_VERSION)
|
||||
set(PLIST_INFO_BUILD_VERSION
|
||||
"${LLVM_SUBMIT_VERSION}.${LLVM_SUBMIT_SUBVERSION}")
|
||||
endif()
|
||||
|
||||
set(PLIST_INFO_PLIST_OUT "${PLIST_INFO_PLIST}")
|
||||
target_link_libraries(${name}
|
||||
"-Wl,-sectcreate,__TEXT,__info_plist,${PLIST_INFO_PLIST_OUT}")
|
||||
configure_file("${SWIFT_SOURCE_DIR}/stdlib/${PLIST_INFO_PLIST}.in" "${PLIST_INFO_PLIST_OUT}" @ONLY)
|
||||
|
||||
set(PLIST_INFO_UTI)
|
||||
set(PLIST_INFO_NAME)
|
||||
set(PLIST_INFO_VERSION)
|
||||
set(PLIST_INFO_BUILD_VERSION)
|
||||
endif()
|
||||
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Swift libraries")
|
||||
endmacro(add_swift_library)
|
||||
|
||||
16
stdlib/Info.plist.in
Normal file
16
stdlib/Info.plist.in
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@PLIST_INFO_UTI@</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>@PLIST_INFO_NAME@</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@PLIST_INFO_VERSION@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@PLIST_INFO_BUILD_VERSION@</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user