aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-24 21:58:49 -0700
committerGitHub <noreply@github.com>2017-03-24 21:58:49 -0700
commit90bb4a2eeb316fbc5055d507044229cbc8bc5337 (patch)
treeff6f9250307cb1280647c3d2536860040c07cf32
parent32827f98c0200778accefee62e7f185daafb97d8 (diff)
parent6ddc4647119eedd3c75e01562df3d7a954533eb8 (diff)
downloadvcpkg-90bb4a2eeb316fbc5055d507044229cbc8bc5337.tar.gz
vcpkg-90bb4a2eeb316fbc5055d507044229cbc8bc5337.zip
Merge pull request #846 from Mixaill/libP7
[libP7-baical] add version 4.1
-rw-r--r--ports/libp7-baical/CMakeLists.txt52
-rw-r--r--ports/libp7-baical/CONTROL3
-rw-r--r--ports/libp7-baical/portfile.cmake32
3 files changed, 87 insertions, 0 deletions
diff --git a/ports/libp7-baical/CMakeLists.txt b/ports/libp7-baical/CMakeLists.txt
new file mode 100644
index 000000000..c4559c603
--- /dev/null
+++ b/ports/libp7-baical/CMakeLists.txt
@@ -0,0 +1,52 @@
+project(P7)
+cmake_minimum_required(VERSION 3.0)
+
+set(SOURCES "Sources/ClBaical.cpp"
+ "Sources/ClFile.cpp"
+ "Sources/ClText.cpp"
+ "Sources/Client.cpp"
+ "Sources/ClNull.cpp"
+ "Sources/CRC32.cpp"
+ "Sources/Proxy.cpp"
+ "Sources/Telemetry.cpp"
+ "Sources/Trace.cpp")
+
+if(WIN32)
+ set(RESOURCES "Sources/P7Client.rc")
+else()
+ set(RESOURCES "")
+endif()
+
+add_library(P7 "${SOURCES}" "${RESOURCES}")
+target_include_directories(P7 PRIVATE "Headers/")
+target_include_directories(P7 PRIVATE "Shared/")
+if(WIN32)
+ target_include_directories(P7 PRIVATE "Shared/Platforms/Windows_x86/")
+ target_link_libraries(P7 "ws2_32")
+else()
+ target_include_directories(P7 PRIVATE "Shared/Platforms/Linux_x86/")
+endif()
+
+if(WIN32)
+ set_target_properties(P7 PROPERTIES PREFIX "")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x64d")
+ set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x64")
+ else()
+ set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x32d")
+ set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x32")
+ endif()
+else()
+ set_target_properties(P7 PROPERTIES PREFIX "lib")
+ set_target_properties(P7 PROPERTIES POSTFIX "")
+ set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "d")
+endif()
+
+install(TARGETS P7
+ RUNTIME DESTINATION "bin"
+ ARCHIVE DESTINATION "lib"
+ LIBRARY DESTINATION "lib")
+
+install(DIRECTORY Headers/
+ DESTINATION include/P7
+ FILES_MATCHING PATTERN "*.h")
diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL
new file mode 100644
index 000000000..df6cf94b6
--- /dev/null
+++ b/ports/libp7-baical/CONTROL
@@ -0,0 +1,3 @@
+Source: libp7-baical
+Version: 4.1
+Description: P7 is a library for high-speed sending telemetry & trace data from application
diff --git a/ports/libp7-baical/portfile.cmake b/ports/libp7-baical/portfile.cmake
new file mode 100644
index 000000000..f298186e0
--- /dev/null
+++ b/ports/libp7-baical/portfile.cmake
@@ -0,0 +1,32 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
+ message(FATAL_ERROR "libP7 does not support ARM")
+endif()
+
+set(LIBP7_VERSION 4.1)
+set(LIBP7_HASH 6259416378f1fe60ad6097faf9facd2de1a3ea13e8015a5727d6a179caa88a7f6707b47273afceebc16b39883da4768f29feac199f7d6c354b744b643c2044ab)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libP7_v${LIBP7_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://baical.net/files/libP7_v${LIBP7_VERSION}.zip"
+ FILENAME "libP7_v${LIBP7_VERSION}.zip"
+ SHA512 ${LIBP7_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_build_cmake()
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libp7-baical/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libp7-baical/License.txt ${CURRENT_PACKAGES_DIR}/share/libp7-baical/copyright) \ No newline at end of file