summarylogtreecommitdiffstats
path: root/0001-Call-library-target-pistache-to-avoid-conflict-with-.patch
blob: 1d930d6d23889cc943baeaa354a108a9c5f2a488 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From b9aac8b2d284179f2c4339e72311d61b20cc3614 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 23 Mar 2017 20:42:27 +0100
Subject: [PATCH 1/2] Call library target pistache to avoid conflict with
 libnet

---
 examples/CMakeLists.txt | 12 ++++++------
 src/CMakeLists.txt      | 12 ++++++------
 tests/CMakeLists.txt    |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 253772d..079841b 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,21 +1,21 @@
 add_executable(http_server http_server.cc)
-target_link_libraries(http_server net_static)
+target_link_libraries(http_server pistache)
 
 add_executable(hello_server hello_server.cc)
-target_link_libraries(hello_server net_static)
+target_link_libraries(hello_server pistache)
 
 add_executable(http_client http_client.cc)
-target_link_libraries(http_client net_static)
+target_link_libraries(http_client pistache)
 
 add_executable(custom_header custom_header.cc)
-target_link_libraries(custom_header net_static)
+target_link_libraries(custom_header pistache)
 
 add_executable(rest_server rest_server.cc)
-target_link_libraries(rest_server net_static)
+target_link_libraries(rest_server pistache)
 
 find_package(RapidJSON)
 if (RapidJSON_FOUND)
 include_directories(${RapidJSON_INCLUDE_DIRS})
 add_executable(rest_description rest_description.cc)
-target_link_libraries(rest_description net_static)
+target_link_libraries(rest_description pistache)
 endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8fcecf1..60902dd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,11 +8,11 @@ set(SOURCE_FILES
     ${CLIENT_SOURCE_FILES}
 )
 
-add_library(net_static ${SOURCE_FILES})
-target_link_libraries(net_static pthread)
-install(TARGETS net_static DESTINATION lib)
+add_library(pistache_static ${SOURCE_FILES})
+target_link_libraries(pistache_static pthread)
+install(TARGETS pistache_static DESTINATION lib)
 
-add_library(net SHARED ${SOURCE_FILES})
-target_link_libraries(net pthread)
-install(TARGETS net DESTINATION lib)
+add_library(pistache SHARED ${SOURCE_FILES})
+target_link_libraries(pistache pthread)
+install(TARGETS pistache DESTINATION lib)
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 155a411..bcf48ab 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,7 +3,7 @@ function(pistache_test test_name)
     set(TEST_SOURCE ${test_name}.cc)
 
     add_executable(${TEST_EXECUTABLE} ${TEST_SOURCE})
-    target_link_libraries(${TEST_EXECUTABLE} gtest gtest_main net_static)
+    target_link_libraries(${TEST_EXECUTABLE} gtest gtest_main pistache)
     add_test(${test_name} ${TEST_EXECUTABLE})
 endfunction()
 
-- 
2.12.1