blob: 1bdf5529bc5e084abfc4a16c40dff1fbf28d76af (
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
|
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 12d808cb5f167015b193f3a7f61f4414f93e3876 Mon Sep 17 00:00:00 2001
From: MXE
Date: Mon, 30 Nov 2015 20:34:28 +1100
Subject: [PATCH] fix dll installation and ws2_32 linking errors
diff --git a/libs/network/src/CMakeLists.txt b/libs/network/src/CMakeLists.txt
index 3f22165..baa70e4 100644
--- a/libs/network/src/CMakeLists.txt
+++ b/libs/network/src/CMakeLists.txt
@@ -21,6 +21,7 @@ install(TARGETS cppnetlib-uri
EXPORT cppnetlibTargets
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
set(CPP-NETLIB_HTTP_SERVER_SRCS server_request_parsers_impl.cpp)
@@ -33,6 +34,7 @@ install(TARGETS cppnetlib-server-parsers
EXPORT cppnetlibTargets
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
set(CPP-NETLIB_HTTP_CLIENT_SRCS client.cpp)
@@ -47,8 +49,12 @@ endif ()
if (Boost_FOUND)
target_link_libraries(cppnetlib-client-connections ${Boost_LIBRARIES})
endif ()
+if (WIN32)
+ target_link_libraries(cppnetlib-client-connections ws2_32)
+endif ()
install(TARGETS cppnetlib-client-connections
EXPORT cppnetlibTargets
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
--
2.4.9 (Apple Git-60)
|