diff --git a/CMakeLists.txt b/CMakeLists.txt index bf93d9a05..fb7903aa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,7 @@ if(NOT CMAKE_BUILD_TYPE) endif() if(NOT DEFINED BUILD_SHARED_LIBS) - if(IOS OR APPLE) + if(IOS) set(BUILD_SHARED_LIBS OFF) else() set(BUILD_SHARED_LIBS ON) @@ -817,6 +817,10 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/..") +if (BUILD_SHARED_LIBS) + set(CMAKE_MACOSX_RPATH ON) +endif() + # Android profiling if(ANDROID) if(WITH_GPROF) diff --git a/client/Mac/CMakeLists.txt b/client/Mac/CMakeLists.txt index 1211ec38c..6865781ac 100644 --- a/client/Mac/CMakeLists.txt +++ b/client/Mac/CMakeLists.txt @@ -83,8 +83,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES MACOSX_FRAMEWORK_SHORT_VERSION_STRING 1.1.0 MACOSX_FRAMEWORK_BUNDLE_BUNDLE_VERSION 1.1.0 INSTALL_NAME_DIR "@executable_path/../Frameworks" - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist - BUILD_WITH_INSTALL_RPATH 1) + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS} freerdp-client) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp) diff --git a/winpr/libwinpr/synch/wait.c b/winpr/libwinpr/synch/wait.c index 721fb5f56..c8e160f6f 100644 --- a/winpr/libwinpr/synch/wait.c +++ b/winpr/libwinpr/synch/wait.c @@ -72,8 +72,13 @@ #include +#ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 +#endif + +#ifndef CLOCK_MONOTONIC #define CLOCK_MONOTONIC 0 +#endif /* clock_gettime is not implemented on OSX prior to 10.12 */ int _mach_clock_gettime(int clk_id, struct timespec *t);