aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorAhmed Yarub Hani Al Nuaimi <ahmedyarub@yahoo.com>2021-03-24 16:47:26 -0300
committerGitHub <noreply@github.com>2021-03-24 12:47:26 -0700
commit6562225c92ec34b92970ce0e4b680856eb6ae24b (patch)
treedf2a48683ce1838174080c10ad665c7a24dc92ae /ports
parent80bd78d3dd06504ad302bf391a7194955913265d (diff)
downloadvcpkg-6562225c92ec34b92970ce0e4b680856eb6ae24b.tar.gz
vcpkg-6562225c92ec34b92970ce0e4b680856eb6ae24b.zip
[spdlog] Fix build for Android (#16819)
* Add Android logging library to spdlog * Update version * Update version * Update ports/spdlog/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update version Co-authored-by: Ahmed Yarub Hani Al Nuaimi <ahmed.alnuaimi@zwift.com> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Diffstat (limited to 'ports')
-rw-r--r--ports/spdlog/CONTROL2
-rw-r--r--ports/spdlog/fix-androidbuild.patch15
-rw-r--r--ports/spdlog/portfile.cmake5
3 files changed, 20 insertions, 2 deletions
diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL
index 5b0271b9e..6110199ff 100644
--- a/ports/spdlog/CONTROL
+++ b/ports/spdlog/CONTROL
@@ -1,6 +1,6 @@
Source: spdlog
Version: 1.8.0
-Port-Version: 2
+Port-Version: 3
Homepage: https://github.com/gabime/spdlog
Description: Very fast, header only, C++ logging library
Build-Depends: fmt
diff --git a/ports/spdlog/fix-androidbuild.patch b/ports/spdlog/fix-androidbuild.patch
new file mode 100644
index 000000000..bd1648e90
--- /dev/null
+++ b/ports/spdlog/fix-androidbuild.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt (revision 4a9ccf7e38e257feecce0c579a782741254eaeef)
++++ b/CMakeLists.txt (date 1616381634500)
+@@ -188,6 +188,11 @@
+ set(PKG_CONFIG_REQUIRES fmt) # add dependency to pkg-config
+ endif ()
+
++if (ANDROID)
++ target_link_libraries(spdlog PUBLIC log)
++ target_link_libraries(spdlog_header_only INTERFACE log)
++endif ()
++
+ # ---------------------------------------------------------------------------------------
+ # Misc definitions according to tweak options
+ # ---------------------------------------------------------------------------------------
diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake
index 30a41fcea..f62514007 100644
--- a/ports/spdlog/portfile.cmake
+++ b/ports/spdlog/portfile.cmake
@@ -4,10 +4,13 @@ vcpkg_from_github(
REF 4a9ccf7e38e257feecce0c579a782741254eaeef # v1.8.0
SHA512 333f14704e0d0aa88abbe4ddd29aeb009de2f845440559d463f1b7f9c7da32b2fbdba0f2abf97ec2a5c479d2d62bb2220b21a1bc423d62fbbb93952cf829d532
HEAD_REF v1.x
- PATCHES fix-featurebuild.patch
+ PATCHES
+ fix-featurebuild.patch
+ fix-androidbuild.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
benchmark SPDLOG_BUILD_BENCH
)