From cebe9e985075912e45bb385fbb6a1505838036da Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Mon, 30 Nov 2015 20:36:36 +1100 Subject: cpp-netlib: enable openssl, fix ws2_32 linking, dll and *.cmake install --- src/cpp-netlib-1-fixes.patch | 47 ++++++++++++++++++++++++++++++++++++++++++++ src/cpp-netlib.mk | 3 ++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/cpp-netlib-1-fixes.patch diff --git a/src/cpp-netlib-1-fixes.patch b/src/cpp-netlib-1-fixes.patch new file mode 100644 index 0000000..67dc72f --- /dev/null +++ b/src/cpp-netlib-1-fixes.patch @@ -0,0 +1,47 @@ +This file is part of MXE. +See index.html for further 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) + diff --git a/src/cpp-netlib.mk b/src/cpp-netlib.mk index 4cafe1d..69f1d2d 100644 --- a/src/cpp-netlib.mk +++ b/src/cpp-netlib.mk @@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 71953379c5a6fab618cbda9ac6639d87b35cab0600a4450a7392bc08c930f $(PKG)_SUBDIR := cpp-netlib-$($(PKG)_VERSION)-final $(PKG)_FILE := cpp-netlib-$($(PKG)_VERSION)-final.tar.gz $(PKG)_URL := http://downloads.cpp-netlib.org/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc boost +$(PKG)_DEPS := gcc boost openssl define $(PKG)_UPDATE $(WGET) -q -O- 'http://cpp-netlib.org/' | \ @@ -21,6 +21,7 @@ define $(PKG)_BUILD mkdir '$(1)/build' cd '$(1)/build' && cmake .. \ -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DINSTALL_CMAKE_DIR='$(PREFIX)/$(TARGET)/cmake/$(PKG)' \ -DCPP-NETLIB_BUILD_EXAMPLES=OFF \ -DCPP-NETLIB_BUILD_TESTS=OFF -- cgit v0.12