libntirpc/libntirpc-1.3.0-src-CMakeList.txt.patch
2015-09-09 13:11:10 -04:00

72 lines
1.9 KiB
Diff

--- ntirpc-1.3.0/CMakeLists.txt.standalone.orig 2015-09-09 12:31:57.130344661 -0400
+++ ntirpc-1.3.0/CMakeLists.txt.standalone 2015-09-09 12:42:32.016344661 -0400
@@ -33,6 +33,8 @@
option (USE_GSS "enable RPCSEC_GSS support" ON)
+option (USE_NFS_RDMA "enable NFS_RDMA support" ON)
+
option(TIRPC_EPOLL "platform supports EPOLL or emulation" ON)
# MSPAC support -lwbclient link flag
@@ -148,6 +150,11 @@
"platform has EPOLL or emulation"
FORCE)
+set(USE_NFS_RDMA ${USE_NFS_RDMA}
+ CACHE BOOL
+ "platform has RDMA"
+ FORCE)
+
# grist files
configure_file(
"${PROJECT_SOURCE_DIR}/config-h.in.cmake"
--- ntirpc-1.3.0/src/CMakeLists.txt.orig 2015-09-08 21:28:58.178344661 -0400
+++ ntirpc-1.3.0/src/CMakeLists.txt 2015-09-09 12:35:52.867344661 -0400
@@ -6,10 +6,11 @@
)
# ok on Linux and FreeBSD w/GCC and clang compilers
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+set(CMAKE_C_FLAGS "-fPIC -isystem ${PROJECT_SOURCE_DIR}/ntirpc ${CMAKE_C_FLAGS}")
include_directories(
- ${PROJECT_SOURCE_DIR}/tirpc
+ ${PROJECT_SOURCE_DIR}/ntirpc
)
########### next target ###############
@@ -110,8 +111,13 @@
svc_rdma.c
xdr_rdma.c
)
+ add_definitions(-DUSE_RPC_RDMA)
endif(USE_NFS_RDMA)
+if(TIRPC_EPOLL)
+ add_definitions(-DTIRPC_EPOLL)
+endif(TIRPC_EPOLL)
+
# declares the library
add_library(ntirpc SHARED
${ntirpc_common_SRCS}
@@ -126,11 +132,16 @@
# set library version and symbol namespace(s) from gen'd map file
set_target_properties(ntirpc PROPERTIES LINK_FLAGS
- "-Wl,--version-script=${LIBNTIRPC_MAP}"
+ "-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/libntirpc.map"
VERSION ${NTIRPC_VERSION}
SOVERSION "${NTIRPC_MAJOR_VERSION}.${NTIRPC_MINOR_VERSION}"
)
+configure_file(
+ "${PROJECT_SOURCE_DIR}/src/libntirpc.map.in.cmake"
+ "${PROJECT_SOURCE_DIR}/src/libntirpc.map"
+)
+
install(TARGETS ntirpc DESTINATION ${LIB_INSTALL_DIR})
########### install files ###############