Fix build with Xcode.

This commit is contained in:
John Preston
2026-03-09 21:23:12 +04:00
parent 71497e592c
commit 7f71e9dd52
4 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ static_assert(-(SpecialMsgIdShift + 0xFF) > ServerMaxMsgId);
return MsgId(StartClientMsgId.bare + index);
}
[[nodiscrd]] constexpr inline bool IsStoryMsgId(MsgId id) noexcept {
[[nodiscard]] constexpr inline bool IsStoryMsgId(MsgId id) noexcept {
return (id >= StartStoryMsgId && id < EndStoryMsgId);
}
[[nodiscard]] constexpr inline StoryId StoryIdFromMsgId(MsgId id) noexcept {
@@ -9,8 +9,18 @@ function(telegram_add_apple_swift_runtime target_name)
return()
endif()
execute_process(
COMMAND xcode-select -p
OUTPUT_VARIABLE DEVELOPER_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(SWIFT_LIB_DIR
"${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx")
target_link_options(${target_name}
PRIVATE
"-L${SWIFT_LIB_DIR}"
"-Wl,-rpath,/usr/lib/swift"
"-Wl,-rpath,@executable_path/../Frameworks"
)
+1 -1
Submodule cmake updated: 34de471d6f...4088db229d