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

FindBullet: separate win32 optimized and debug libraries #1395

Merged
merged 3 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
variables:
VCPKG_INSTALL_ROOT: $(Build.SourcesDirectory)\vcpkg
VCPKG_ARCH: 'x64-windows'
VCPKG_PACKAGES: 'assimp boost-system boost-filesystem ccd eigen3 fcl'
VCPKG_PACKAGES: 'assimp boost-system boost-filesystem bullet3 ccd eigen3 fcl ode'
scpeters marked this conversation as resolved.
Show resolved Hide resolved
BUILD_TOOLSET_VERSION: '142'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
steps:
Expand Down
12 changes: 11 additions & 1 deletion cmake/DARTFindBullet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
find_package(Bullet COMPONENTS BulletMath BulletCollision MODULE QUIET)

if((BULLET_FOUND OR Bullet_FOUND) AND NOT TARGET Bullet)
if(WIN32 AND "optimized" IN_LIST BULLET_LIBRARIES
AND "debug" IN_LIST BULLET_LIBRARIES)
cmake_parse_arguments(BULLET_INTERFACE_LIBRARIES "" "" "debug;optimized"
jslee02 marked this conversation as resolved.
Show resolved Hide resolved
${BULLET_LIBRARIES})
set(BULLET_INTERFACE_LIBRARIES
$<$<CONFIG:Debug>:${BULLET_INTERFACE_LIBRARIES_debug}>
$<$<NOT:$<CONFIG:Debug>>:${BULLET_INTERFACE_LIBRARIES_optimized}>)
else()
set(BULLET_INTERFACE_LIBRARIES ${BULLET_LIBRARIES})
endif()
add_library(Bullet INTERFACE IMPORTED)
set_target_properties(Bullet PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${BULLET_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${BULLET_LIBRARIES}"
INTERFACE_LINK_LIBRARIES "${BULLET_INTERFACE_LIBRARIES}"
)
endif()