Skip to content

Commit

Permalink
bug fix:
Browse files Browse the repository at this point in the history
- revert tbb changes
- unset(freeimage_FOUND CACHE)
- unset(tinyxml_FOUND CACHE)
- set(Simbody_LIBRARIES ${Simbody_STATIC_LIBRARIES}) when ${Simbody_LIBRARIES} not found. this is static build case
  • Loading branch information
talregev committed Aug 16, 2023
1 parent 6483a50 commit 65a3d0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 2 additions & 0 deletions cmake/FindFreeimage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if (PKG_CONFIG_FOUND)
endif (NOT freeimage_FOUND)
endif (PKG_CONFIG_FOUND)
if (NOT freeimage_FOUND)
# Workaround for CMake bug https://gitlab.kitware.com/cmake/cmake/issues/17135
unset(freeimage_FOUND CACHE)
find_package(freeimage CONFIG)
if (freeimage_FOUND)
set(freeimage_LIBRARIES freeimage::FreeImage)
Expand Down
16 changes: 6 additions & 10 deletions cmake/SearchForStuff.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ if (PKG_CONFIG_FOUND)
#list(APPEND CMAKE_MODULE_PATH ${SimTK_INSTALL_PREFIX}/share/cmake)
find_package(Simbody)
if (Simbody_FOUND)
# When simbody is found but it don't define any libs, we should manually define the libs.
# When simbody is found but it static libs, we need to add it manually.
if ("${Simbody_LIBRARIES}" STREQUAL "" OR "${Simbody_LIBRARIES}" STREQUAL "Simbody_LIBRARIES-NOTFOUND")
set(Simbody_LIBRARIES SimTKmath SimTKcommon SimTKsimbody)
set(Simbody_LIBRARIES ${Simbody_STATIC_LIBRARIES}),
endif()
set (HAVE_SIMBODY TRUE)
else()
Expand Down Expand Up @@ -218,6 +218,8 @@ if (PKG_CONFIG_FOUND)
message (STATUS "Using system tinyxml.")
pkg_check_modules(tinyxml tinyxml)
if (NOT tinyxml_FOUND)
# Workaround for CMake bug https://gitlab.kitware.com/cmake/cmake/issues/17135
unset(tinyxml_FOUND CACHE)
find_package(tinyxml CONFIG)
if (tinyxml_FOUND)
message (STATUS "tinyxml found via find_package")
Expand Down Expand Up @@ -336,16 +338,10 @@ if (PKG_CONFIG_FOUND)

#################################################
# Find TBB
find_package(TBB CONFIG REQUIRED)
if (TBB_FOUND)
set(TBB_LIBRARIES TBB::tbb TBB::tbbmalloc)
message (STATUS "TBB version: " ${TBB_VERSION})
endif()
if (NOT TBB_FOUND)
pkg_check_modules(TBB tbb)
endif()
pkg_check_modules(TBB tbb)
set (TBB_PKG_CONFIG "tbb")
if (NOT TBB_FOUND)

message(STATUS "TBB not found, attempting to detect manually")
set (TBB_PKG_CONFIG "")

Expand Down

0 comments on commit 65a3d0d

Please sign in to comment.