aboutsummaryrefslogtreecommitdiff
path: root/ports/ccd/support-emscripten.patch
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2020-06-12 08:20:27 +0200
committerGitHub <noreply@github.com>2020-06-11 23:20:27 -0700
commitb97fe822f5e59fbf6b93fd9c97794dddc1d8b9f0 (patch)
tree5858583c7f586ebd0c76d2e2f621a1dfe61c1b44 /ports/ccd/support-emscripten.patch
parent310f4df34f154e1e2cd0502a717baf6ccbe29549 (diff)
downloadvcpkg-b97fe822f5e59fbf6b93fd9c97794dddc1d8b9f0.tar.gz
vcpkg-b97fe822f5e59fbf6b93fd9c97794dddc1d8b9f0.zip
[ccd] Add emscripten support (#11407)
Backport upstream patch: https://github.com/danfis/libccd/pull/70 Disable BUILD_TESTING, that has also the nice side effect of a faster build on all triplets.
Diffstat (limited to 'ports/ccd/support-emscripten.patch')
-rw-r--r--ports/ccd/support-emscripten.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/ports/ccd/support-emscripten.patch b/ports/ccd/support-emscripten.patch
new file mode 100644
index 000000000..2fe689a79
--- /dev/null
+++ b/ports/ccd/support-emscripten.patch
@@ -0,0 +1,25 @@
+From c3616f28d33019047e8e71df8abeb0493159539e Mon Sep 17 00:00:00 2001
+From: Silvio Traversaro <silvio@traversaro.it>
+Date: Sun, 17 May 2020 11:42:24 +0200
+Subject: [PATCH] Fix configuration with Emscripten
+
+In Emscripten there is no separate libm library, so there is no need to explicitly link it,
+and in particular the find_library call would fail as there is not libm to find.
+See https://stackoverflow.com/questions/24663915/how-can-i-link-libm-to-my-emscripten-port
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1407080..357ed76 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -48,7 +48,7 @@ target_include_directories(ccd PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
+
+-if(NOT WIN32)
++if(NOT WIN32 AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Emscripten"))
+ find_library(LIBM_LIBRARY NAMES m)
+ if(NOT LIBM_LIBRARY)
+ message(FATAL_ERROR "Could NOT find required library LibM")