Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix-ups for macOS #318

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ext/clip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ if(WIN32)
endif()
list(APPEND CLIP_SOURCES clip_win.cpp)
elseif(APPLE)
add_definitions(-fobjc-arc)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_definitions(-fobjc-arc)
endif()

execute_process(COMMAND sw_vers -productVersion OUTPUT_VARIABLE OS_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(OS_VERSION VERSION_GREATER_EQUAL "10.10.0")
Expand Down
4 changes: 4 additions & 0 deletions lib/ncutil/src/fileutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include <set>
#include <string>

#ifdef __APPLE__
#include <sys/types.h> // ssize_t
#endif

struct DirEntry
{
DirEntry()
Expand Down
4 changes: 3 additions & 1 deletion lib/tgchat/ext/td/tdnet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ if (APPLE_WATCH)
td/net/DarwinHttp.mm
td/net/DarwinHttp.h
)
set_source_files_properties(td/net/DarwinHttp.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set_source_files_properties(td/net/DarwinHttp.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
endif()
endif()

add_library(tdnet STATIC ${TDNET_SOURCE})
Expand Down
Loading