aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/third-party/memif.patch
blob: 0fb4588bb8dbf60d5d90a2504602cd077900f108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/extras/libmemif/CMakeLists.txt b/extras/libmemif/CMakeLists.txt
index b6b658c2d..e5f5ffd9d 100644
--- a/extras/libmemif/CMakeLists.txt
+++ b/extras/libmemif/CMakeLists.txt
@@ -24,7 +24,7 @@ if (NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release")
 endif ()

-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -DMEMIF_DBG -DICMP_DBG")
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -DICMP_DBG")
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
 set(CMAKE_INSTALL_MESSAGE NEVER)
@@ -59,7 +59,7 @@ endforeach()
   # extract version from git
 execute_process(
   COMMAND git describe --long --match v*
-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE VER
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )
diff --git a/extras/libmemif/src/CMakeLists.txt b/extras/libmemif/src/CMakeLists.txt
index ddb8a52f8..b52566e5c 100644
--- a/extras/libmemif/src/CMakeLists.txt
+++ b/extras/libmemif/src/CMakeLists.txt
@@ -32,22 +32,7 @@ list(APPEND MEMIF_SOURCES

 include_directories(${HEADERS_DIR})

-add_library(memif SHARED ${MEMIF_SOURCES})
-target_link_libraries(memif ${CMAKE_THREAD_LIBS_INIT})
+add_library(memif OBJECT ${MEMIF_SOURCES})
+set_property(TARGET memif PROPERTY POSITION_INDEPENDENT_CODE ON)

-find_library(LIB_BSD bsd)
-if(LIB_BSD)
-  add_compile_definitions(HAS_LIB_BSD)
-  target_link_libraries(memif ${LIB_BSD})
-endif()
-
-foreach(file ${MEMIF_HEADERS})
-  get_filename_component(dir ${file} DIRECTORY)
-     install(
-	FILES ${file}
-	DESTINATION include/${lib}/${dir}
-	COMPONENT libmemif-dev
-      )
-endforeach()
-
-install(TARGETS memif DESTINATION lib COMPONENT libmemif)
+target_link_libraries(memif ${CMAKE_THREAD_LIBS_INIT})