Changeset View
Changeset View
Standalone View
Standalone View
devel/RStudio/files/patch-src_cpp_core_CMakeLists.txt
--- src/cpp/core/CMakeLists.txt.orig 2017-11-16 21:40:37 UTC | --- src/cpp/core/CMakeLists.txt.orig 2017-11-16 21:40:37 UTC | ||||
+++ src/cpp/core/CMakeLists.txt | +++ src/cpp/core/CMakeLists.txt | ||||
@@ -143,16 +143,17 @@ if (UNIX) | @@ -149,22 +149,26 @@ if (UNIX) | ||||
} | } | ||||
" | " | ||||
HAVE_SCANDIR_POSIX) | HAVE_SCANDIR_POSIX) | ||||
- | - | ||||
# platform introspection | # platform introspection | ||||
check_symbol_exists(SA_NOCLDWAIT "signal.h" HAVE_SA_NOCLDWAIT) | check_symbol_exists(SA_NOCLDWAIT "signal.h" HAVE_SA_NOCLDWAIT) | ||||
check_symbol_exists(SO_PEERCRED "sys/socket.h" HAVE_SO_PEERCRED) | check_symbol_exists(SO_PEERCRED "sys/socket.h" HAVE_SO_PEERCRED) | ||||
+ set(CMAKE_REQUIRED_LIBRARIES ${FREEBSD_LIBDIR}/libinotify.so) | + find_path(INOTIFY_INCLUDE_DIRS sys/inotify.h PATH_SUFFIXES libinotify inotify) | ||||
+ find_library(INOTIFY_LIBRARIES NAMES inotify) | |||||
+ set(CMAKE_REQUIRED_LIBRARIES ${INOTIFY_LIBRARIES}) | |||||
check_function_exists(inotify_init1 HAVE_INOTIFY_INIT1) | check_function_exists(inotify_init1 HAVE_INOTIFY_INIT1) | ||||
+ set(CMAKE_REQUIRED_LIBRARIES "") | + set(CMAKE_REQUIRED_LIBRARIES "") | ||||
check_function_exists(getpeereid HAVE_GETPEEREID) | check_function_exists(getpeereid HAVE_GETPEEREID) | ||||
check_function_exists(setresuid HAVE_SETRESUID) | check_function_exists(setresuid HAVE_SETRESUID) | ||||
- if(EXISTS "/proc/self") | - if(EXISTS "/proc/self") | ||||
+ #if(EXISTS "/proc/self") | + #if(EXISTS "/proc/self") | ||||
set(HAVE_PROCSELF TRUE) | set(HAVE_PROCSELF TRUE) | ||||
- endif() | - endif() | ||||
+ #endif() | + #endif() | ||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in | ||||
${CMAKE_CURRENT_BINARY_DIR}/config.h) | ${CMAKE_CURRENT_BINARY_DIR}/config.h) | ||||
# find packages and libraries | |||||
find_library(PTHREAD_LIBRARIES pthread) | |||||
if(NOT APPLE) | |||||
+ find_library(PROCSTAT_LIBRARIES procstat) | |||||
find_library(UTIL_LIBRARIES util) | |||||
find_library(UUID_LIBRARIES uuid) | |||||
find_library(RT_LIBRARIES rt) | |||||
@@ -177,7 +181,13 @@ if (UNIX) | |||||
endif() | |||||
# include directories and libraries | |||||
+ set(CORE_INCLUDE_DIRS | |||||
+ ${CORE_INCLUDE_DIRS} | |||||
+ ${INOTIFY_INCLUDE_DIRS} | |||||
+ ) | |||||
set (CORE_SYSTEM_LIBRARIES | |||||
+ ${INOTIFY_LIBRARIES} | |||||
+ ${PROCSTAT_LIBRARIES} | |||||
${PTHREAD_LIBRARIES} | |||||
${UTIL_LIBRARIES} | |||||
${UUID_LIBRARIES} |