mirror of https://github.com/microsoft/vcpkg.git
[evpp]Fix linux build. (#8050)
This commit is contained in:
parent
63f1f07efb
commit
fa66acbf5a
|
|
@ -1,5 +1,5 @@
|
|||
Source: evpp
|
||||
Version: 0.7.0
|
||||
Version: 0.7.0-1
|
||||
Homepage: https://github.com/Qihoo360/evpp
|
||||
Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.
|
||||
Build-Depends: glog, libevent, rapidjson
|
||||
Build-Depends: glog, libevent, rapidjson, concurrentqueue (!windows), boost-lockfree (!windows)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7872fc8..2a06614 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -47,7 +47,11 @@ string (REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
|
||||
if (UNIX)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb -D_DEBUG -DGOOGLE_STRIP_LOG=0")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ggdb -DNDEBUG -DGOOGLE_STRIP_LOG=1")
|
||||
- SET(DEPENDENT_LIBRARIES event glog pthread)
|
||||
+ find_package(glog CONFIG REQUIRED)
|
||||
+ find_path(GLOG_INCLUDE_DIRS logging.h PATH_SUFFIXES glog)
|
||||
+ find_package(Libevent CONFIG REQUIRED)
|
||||
+ list(APPEND DEPENDENT_INCLUDE_DIRS "${GLOG_INCLUDE_DIRS}/../")
|
||||
+ SET(DEPENDENT_LIBRARIES event_static event_core_static event_extra_static event_openssl_static glog::glog pthread)
|
||||
else (UNIX)
|
||||
SET(DEPENDENT_LIBRARIES event glog)
|
||||
endif (UNIX)
|
||||
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
|
||||
index 469ed1c..8219424 100644
|
||||
--- a/apps/CMakeLists.txt
|
||||
+++ b/apps/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@
|
||||
include_directories(${PROJECT_SOURCE_DIR}/apps ${PROJECT_SOURCE_DIR}/3rdparty)
|
||||
|
||||
if (UNIX)
|
||||
-set(LIBRARIES evpp_concurrentqueue event glog pthread)
|
||||
+set(LIBRARIES evpp_concurrentqueue event_static event_core_static event_extra_static event_openssl_static glog::glog pthread)
|
||||
link_directories("/home/s/safe/lib" ${PROJECT_BUILD_DIR}/lib)
|
||||
else(UNIX)
|
||||
set(LIBRARIES evpp_static event glog)
|
||||
diff --git a/benchmark/http/libevent/CMakeLists.txt b/benchmark/http/libevent/CMakeLists.txt
|
||||
index 1148616..0356b71 100644
|
||||
--- a/benchmark/http/libevent/CMakeLists.txt
|
||||
+++ b/benchmark/http/libevent/CMakeLists.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
|
||||
add_executable(benchmark_http_libevent libevent_http_bench.c)
|
||||
-target_link_libraries(benchmark_http_libevent event)
|
||||
+target_link_libraries(benchmark_http_libevent event_static event_core_static event_extra_static event_openssl_static)
|
||||
diff --git a/benchmark/ioevent/libevent/CMakeLists.txt b/benchmark/ioevent/libevent/CMakeLists.txt
|
||||
index dfa51a3..de4849d 100644
|
||||
--- a/benchmark/ioevent/libevent/CMakeLists.txt
|
||||
+++ b/benchmark/ioevent/libevent/CMakeLists.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
|
||||
add_executable(benchmark_ioevent_libevent libevent_ioevent_bench.c)
|
||||
-target_link_libraries(benchmark_ioevent_libevent event)
|
||||
+target_link_libraries(benchmark_ioevent_libevent event_static event_core_static event_extra_static event_openssl_static)
|
||||
diff --git a/benchmark/throughput/libevent/CMakeLists.txt b/benchmark/throughput/libevent/CMakeLists.txt
|
||||
index 21dab84..aefe698 100644
|
||||
--- a/benchmark/throughput/libevent/CMakeLists.txt
|
||||
+++ b/benchmark/throughput/libevent/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
add_executable(benchmark_tcp_libevent_client client.c)
|
||||
-target_link_libraries(benchmark_tcp_libevent_client event)
|
||||
+target_link_libraries(benchmark_tcp_libevent_client event_static event_core_static event_extra_static event_openssl_static)
|
||||
|
||||
add_executable(benchmark_tcp_libevent_server server.c)
|
||||
-target_link_libraries(benchmark_tcp_libevent_server event)
|
||||
+target_link_libraries(benchmark_tcp_libevent_server event_static event_core_static event_extra_static event_openssl_static)
|
||||
diff --git a/examples/recipes/self_control_timer/basic_01/CMakeLists.txt b/examples/recipes/self_control_timer/basic_01/CMakeLists.txt
|
||||
index 7834db4..82294c5 100644
|
||||
--- a/examples/recipes/self_control_timer/basic_01/CMakeLists.txt
|
||||
+++ b/examples/recipes/self_control_timer/basic_01/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
file(GLOB SRCS *.cc *.h)
|
||||
|
||||
add_executable(example_recipes_self_control_timer_basic_01 ${SRCS})
|
||||
-target_link_libraries(example_recipes_self_control_timer_basic_01 event)
|
||||
+target_link_libraries(example_recipes_self_control_timer_basic_01 event_static event_core_static event_extra_static event_openssl_static)
|
||||
|
||||
|
||||
|
||||
diff --git a/examples/recipes/self_control_timer/basic_02/CMakeLists.txt b/examples/recipes/self_control_timer/basic_02/CMakeLists.txt
|
||||
index a8be419..0329ccc 100644
|
||||
--- a/examples/recipes/self_control_timer/basic_02/CMakeLists.txt
|
||||
+++ b/examples/recipes/self_control_timer/basic_02/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
file(GLOB SRCS *.cc *.h)
|
||||
|
||||
add_executable(example_recipes_self_control_timer_basic_02 ${SRCS})
|
||||
-target_link_libraries(example_recipes_self_control_timer_basic_02 event)
|
||||
+target_link_libraries(example_recipes_self_control_timer_basic_02 event_static event_core_static event_extra_static event_openssl_static)
|
||||
|
||||
|
||||
|
||||
diff --git a/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt b/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt
|
||||
index 1cae9bb..218b771 100644
|
||||
--- a/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt
|
||||
+++ b/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
file(GLOB SRCS *.cc *.h)
|
||||
|
||||
add_executable(example_recipes_self_control_timer_cancel_03 ${SRCS})
|
||||
-target_link_libraries(example_recipes_self_control_timer_cancel_03 event)
|
||||
+target_link_libraries(example_recipes_self_control_timer_cancel_03 event_static event_core_static event_extra_static event_openssl_static)
|
||||
|
||||
|
||||
|
||||
diff --git a/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt b/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt
|
||||
index 749c584..e7c658e 100644
|
||||
--- a/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt
|
||||
+++ b/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
file(GLOB SRCS *.cc *.h)
|
||||
|
||||
add_executable(example_recipes_self_control_timer_periodic_04 ${SRCS})
|
||||
-target_link_libraries(example_recipes_self_control_timer_periodic_04 event)
|
||||
+target_link_libraries(example_recipes_self_control_timer_periodic_04 event_static event_core_static event_extra_static event_openssl_static)
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,32 +1,18 @@
|
|||
include(vcpkg_common_functions)
|
||||
|
||||
set(EVPP_LOCAL_TEST OFF)
|
||||
|
||||
set(EVPP_VERSION 0.7.0)
|
||||
if (EVPP_LOCAL_TEST)
|
||||
set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://127.0.0.1:8000/evpp.zip"
|
||||
FILENAME "evpp-${EVPP_VERSION}.zip"
|
||||
SHA512 ${EVPP_HASH}
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
else ()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Qihoo360/evpp
|
||||
REF v${EVPP_VERSION}
|
||||
SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88
|
||||
HEAD_REF master
|
||||
)
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-rapidjson-1-1.patch
|
||||
)
|
||||
endif ()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Qihoo360/evpp
|
||||
REF v${EVPP_VERSION}
|
||||
SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-rapidjson-1-1.patch
|
||||
fix-linux-build.patch
|
||||
)
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
|
|
@ -40,6 +26,5 @@ vcpkg_install_cmake()
|
|||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue