-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Source: libp7client | ||
Version: 5.2 | ||
Description: Open source, cross-platform, fastest library for sending logs, telemetry & trace data from your application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
diff --git a/Sources/P7ClientDll.vcxproj b/Sources/P7ClientDll.vcxproj | ||
index 9fab3d0..a7035d9 100644 | ||
--- a/Sources/P7ClientDll.vcxproj | ||
+++ b/Sources/P7ClientDll.vcxproj | ||
@@ -112,7 +112,7 @@ | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<ShowIncludes>false</ShowIncludes> | ||
<EnablePREfast>false</EnablePREfast> | ||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
@@ -137,7 +137,7 @@ | ||
<Optimization>Disabled</Optimization> | ||
<PreprocessorDefinitions>_WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
@@ -165,7 +165,7 @@ | ||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
+ <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
@@ -195,7 +195,7 @@ | ||
<PreprocessorDefinitions>_WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
+ <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
diff --git a/Sources/P7ClientLib.vcxproj b/Sources/P7ClientLib.vcxproj | ||
index 3b46bab..725f8a4 100644 | ||
--- a/Sources/P7ClientLib.vcxproj | ||
+++ b/Sources/P7ClientLib.vcxproj | ||
@@ -161,6 +161,7 @@ | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<ShowIncludes>false</ShowIncludes> | ||
<EnablePREfast>false</EnablePREfast> | ||
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
@@ -181,6 +182,7 @@ | ||
<Optimization>Disabled</Optimization> | ||
<PreprocessorDefinitions>_WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
@@ -204,6 +206,7 @@ | ||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
@@ -255,6 +258,7 @@ | ||
<PreprocessorDefinitions>_WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>$(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | ||
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# Common Ambient Variables: | ||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} | ||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} | ||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} | ||
# PORT = current port name (zlib, etc) | ||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) | ||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) | ||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) | ||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> | ||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) | ||
# | ||
|
||
include(vcpkg_common_functions) | ||
|
||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
message(FATAL_ERROR "Unsupported system: ${VCPKG_CMAKE_SYSTEM_NAME}") | ||
elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
message(FATAL_ERROR "Unsupported system: ${VCPKG_CMAKE_SYSTEM_NAME}") | ||
elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux ") | ||
message(FATAL_ERROR "Unsupported system: ${VCPKG_CMAKE_SYSTEM_NAME}") | ||
endif() | ||
|
||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") | ||
set(BUILD_ARCH "Win32") | ||
set(ARCH "32") | ||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") | ||
set(BUILD_ARCH "x64") | ||
set(ARCH "64") | ||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") | ||
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") | ||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") | ||
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") | ||
else() | ||
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") | ||
endif() | ||
|
||
set(VERSION 5.2) | ||
|
||
vcpkg_download_distfile(ARCHIVE | ||
URLS "http://baical.net/files/libP7Client_v${VERSION}.zip" | ||
FILENAME "libP7Client_v${VERSION}.zip" | ||
SHA512 9744b9c3f091db90aca3485408d3e1169317152ea353ab3845cd7cfb9d61d105b55be17ad83c5970e01d7d0f37566313bc18c0f8a4c16bcd1582cd7a5ea29b87 | ||
) | ||
|
||
vcpkg_extract_source_archive_ex( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
ARCHIVE ${ARCHIVE} | ||
NO_REMOVE_ONE_LEVEL | ||
REF ${VERSION} | ||
PATCHES | ||
"fix-runtime-library.patch" | ||
) | ||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
vcpkg_build_msbuild( | ||
PROJECT_PATH ${SOURCE_PATH}/Sources/P7ClientLib.vcxproj | ||
PLATFORM ${BUILD_ARCH} | ||
RELEASE_CONFIGURATION | ||
DEBUG_CONFIGURATION | ||
OPTIONS | ||
"/p:NoWarn=C4996" | ||
) | ||
|
||
file(GLOB LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.lib") | ||
file(GLOB D_LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.lib") | ||
else() | ||
vcpkg_build_msbuild( | ||
PROJECT_PATH ${SOURCE_PATH}/Sources/P7ClientDll.vcxproj | ||
PLATFORM ${BUILD_ARCH} | ||
#RELEASE_CONFIGURATION | ||
#DEBUG_CONFIGURATION | ||
OPTIONS | ||
"/p:NoWarn=C4996" | ||
) | ||
|
||
file(GLOB DLL_LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.dll.lib") | ||
file(GLOB D_DLL_LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.dll.lib") | ||
|
||
file(GLOB DLL_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.dll") | ||
file(GLOB D_DLL_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.dll") | ||
|
||
file(GLOB PDB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.pdb") | ||
file(GLOB D_PDB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.pdb") | ||
|
||
endif() | ||
|
||
file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Headers/*.h") | ||
file(INSTALL | ||
${HEADER_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/P7 | ||
) | ||
|
||
#file(GLOB EXE_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.exe") | ||
#file(GLOB D_EXE_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.exe") | ||
|
||
file(INSTALL | ||
${LIB_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib | ||
) | ||
file(INSTALL | ||
${D_LIB_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib | ||
) | ||
file(INSTALL | ||
${DLL_LIB_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib | ||
) | ||
file(INSTALL | ||
${D_DLL_LIB_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib | ||
) | ||
file(INSTALL | ||
${DLL_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin | ||
) | ||
file(INSTALL | ||
${D_DLL_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin | ||
) | ||
file(INSTALL | ||
${PDB_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin | ||
) | ||
file(INSTALL | ||
${D_PDB_FILES} | ||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin | ||
) | ||
|
||
file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libp7client RENAME copyright) | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
endif() | ||
|
||
vcpkg_copy_pdbs() |