Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC linking for assimp and fcl #1510

Merged
merged 7 commits into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmake/Findassimp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,20 @@ 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
HINTS ${PC_ASSIMP_LIBDIR})
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)
Expand Down
9 changes: 7 additions & 2 deletions cmake/Findfcl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down