-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from traversaro/fix-bullet
Depend on bullet-cpp and check that bullet collision detector is built and fix linking of fcl and assimp on Windows
- Loading branch information
Showing
2 changed files
with
71 additions
and
2 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,66 @@ | ||
From 2ed57ec92624080e1661441e1572b867378d0f5f Mon Sep 17 00:00:00 2001 | ||
From: Silvio Traversaro <[email protected]> | ||
Date: Sat, 17 Oct 2020 02:20:05 +0200 | ||
Subject: [PATCH] Fix MSVC linking for assimp and fcl (#1510) | ||
|
||
Co-authored-by: Jeongseok Lee <[email protected]> | ||
--- | ||
cmake/Findassimp.cmake | 9 +++++++-- | ||
cmake/Findfcl.cmake | 9 +++++++-- | ||
2 files changed, 14 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/cmake/Findassimp.cmake b/cmake/Findassimp.cmake | ||
index 3063d6d20cb..07b4a417385 100644 | ||
--- a/cmake/Findassimp.cmake | ||
+++ b/cmake/Findassimp.cmake | ||
@@ -26,7 +26,10 @@ find_path(ASSIMP_INCLUDE_DIRS assimp/scene.h | ||
|
||
# Libraries | ||
if(MSVC) | ||
- set(ASSIMP_LIBRARIES "assimp$<$<CONFIG:Debug>:d>") | ||
+ find_package(assimp QUIET CONFIG) | ||
+ if(TARGET assimp::assimp) | ||
+ set(ASSIMP_LIBRARIES "assimp::assimp") | ||
+ endif() | ||
else() | ||
find_library(ASSIMP_LIBRARIES | ||
NAMES assimp | ||
@@ -34,7 +37,9 @@ else() | ||
endif() | ||
|
||
# Version | ||
-set(ASSIMP_VERSION ${PC_ASSIMP_VERSION}) | ||
+if(PC_ASSIMP_VERSION) | ||
+ set(ASSIMP_VERSION ${PC_ASSIMP_VERSION}) | ||
+endif() | ||
|
||
# Set (NAME)_FOUND if all the variables and the version are satisfied. | ||
include(FindPackageHandleStandardArgs) | ||
diff --git a/cmake/Findfcl.cmake b/cmake/Findfcl.cmake | ||
index e49de2cadb2..5f586c675dc 100644 | ||
--- a/cmake/Findfcl.cmake | ||
+++ b/cmake/Findfcl.cmake | ||
@@ -28,7 +28,10 @@ find_path(FCL_INCLUDE_DIRS | ||
|
||
# Libraries | ||
if(MSVC) | ||
- set(FCL_LIBRARIES "fcl$<$<CONFIG:Debug>:d>") | ||
+ find_package(fcl QUIET CONFIG) | ||
+ if(TARGET fcl) | ||
+ set(FCL_LIBRARIES fcl) | ||
+ endif() | ||
else() | ||
# Give explicit precedence to ${PC_FCL_LIBDIR} | ||
find_library(FCL_LIBRARIES | ||
@@ -44,7 +47,9 @@ else() | ||
endif() | ||
|
||
# Version | ||
-set(FCL_VERSION ${PC_FCL_VERSION}) | ||
+if(PC_FCL_VERSION) | ||
+ set(FCL_VERSION ${PC_FCL_VERSION}) | ||
+endif() | ||
|
||
# Set (NAME)_FOUND if all the variables and the version are satisfied. | ||
include(FindPackageHandleStandardArgs) | ||
|
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