Fixed RPATH settings for OS X

This commit is contained in:
Armin Novak 2017-04-06 08:05:39 +02:00
parent 9534b40a1d
commit bba910bd85
3 changed files with 11 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -72,8 +72,13 @@
#include <mach/mach_time.h>
#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);