Merge pull request #942 from htacg/mac_info_plist

Link macOS console application with required plist
This commit is contained in:
Jim Derry 2021-05-21 08:27:04 -04:00 committed by GitHub
commit 5bc1ca5670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View file

@ -441,6 +441,14 @@ if (SUPPORT_CONSOLE_APP)
if (MSVC)
set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
endif ()
if (APPLE)
string(TIMESTAMP CURRENT_YEAR "%Y")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/console/Info.plist.in
${CMAKE_CURRENT_BINARY_DIR}/Info.plist
)
target_link_options(${name} PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,Info.plist)
endif ()
if (NOT TIDY_CONSOLE_SHARED)
set_target_properties( ${name} PROPERTIES
COMPILE_FLAGS "-DTIDY_STATIC" )

View file

@ -33,3 +33,4 @@ tidy1.xsl
tidy.pc
*.vcproj
.pkg
Info.plist

18
console/Info.plist.in Normal file
View file

@ -0,0 +1,18 @@
<?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>CFBundleDisplayName</key>
<string>HTML Tidy</string>
<key>CFBundleIdentifier</key>
<string>org.htacg.html-tidy.tidy5</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>@LIBTIDY_VERSION@</string>
<key>CFBundleVersion</key>
<string>@LIBTIDY_DATE@</string>
<key>NSHumanReadableCopyright</key>
<string>©@CURRENT_YEAR@ HTACG and Contributors</string>
</dict>
</plist>