mirror of https://github.com/microsoft/vcpkg.git
[easyloggingpp] Fix compile errors on uwp (#33453)
* Generate Imath.pc * update version * add dependency imath minizip-ng * updata version * update version * fix build error on uwp * update version * modify code source * update version * update version * update version * modify patch name * update version * update version * update version
This commit is contained in:
parent
61540c40a6
commit
b49a27d25d
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9221dab..b18e0f5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -28,6 +28,7 @@ option(lib_utc_datetime "Build library with UTC date/time logging" OFF)
|
||||
option(no_default_logfile "Do not write to default log file \"myeasylog.log\" (define ELPP_NO_DEFAULT_LOG_FILE)" OFF)
|
||||
option(thread_safe "Build easyloggingpp thread safe (define ELPP_THREAD_SAFE)" OFF)
|
||||
option(use_std_threads "Use standard library thread synchronization (define ELPP_FORCE_USE_STD_THREAD)" OFF)
|
||||
+option(is_uwp "The compilation platform is uwp." OFF)
|
||||
|
||||
set(ELPP_MAJOR_VERSION "9")
|
||||
set(ELPP_MINOR_VERSION "96")
|
||||
@@ -76,6 +77,9 @@ if (build_static_lib)
|
||||
require_cpp11()
|
||||
add_library(easyloggingpp STATIC src/easylogging++.cc)
|
||||
set_property(TARGET easyloggingpp PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
+ if(is_uwp)
|
||||
+ target_compile_definitions(easyloggingpp PUBLIC WIN32_LEAN_AND_MEAN ELPP_WINSOCK2)
|
||||
+ endif()
|
||||
|
||||
install(TARGETS
|
||||
easyloggingpp
|
||||
|
|
@ -2,12 +2,13 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO muflihun/easyloggingpp
|
||||
REF v9.97.0
|
||||
REPO abumq/easyloggingpp
|
||||
REF "v${VERSION}"
|
||||
SHA512 e45789edaf7a43ad6a73861840d24ccce9b9d6bba1aaacf93c6ac26ff7449957251d2ca322c9da85130b893332dd305b13a2499eaffc65ecfaaafa3e11f8d63d
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001_add_cmake_options.patch
|
||||
0002_fix_build_uwp.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
|
@ -16,18 +17,21 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|||
thread-safe thread_safe
|
||||
no-defaultfile no_default_logfile
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
set(TARGET_IS_UWP ON)
|
||||
endif()
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-Dbuild_static_lib=ON
|
||||
-Dis_uwp=${TARGET_IS_UWP}
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
"name": "easyloggingpp",
|
||||
"version": "9.97.0",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "Easylogging++ is a single header efficient logging library for C++ applications.",
|
||||
"homepage": "https://github.com/amrayn/easyloggingpp",
|
||||
"homepage": "https://github.com/abumq/easyloggingpp",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
|
|
|||
|
|
@ -2290,7 +2290,7 @@
|
|||
},
|
||||
"easyloggingpp": {
|
||||
"baseline": "9.97.0",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"eathread": {
|
||||
"baseline": "1.32.09",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "89605d63db69f67c4dfaf9a5b2cc33650967e065",
|
||||
"version": "9.97.0",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "69f6b238899967e671f818a164f21de0219546bc",
|
||||
"version": "9.97.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue