Skip to content

Commit

Permalink
Merge pull request #693 from ManifoldFR/master
Browse files Browse the repository at this point in the history
FindCHOLMOD : check if CHOLMOD target exists before trying to import
  • Loading branch information
jcarpent authored May 8, 2024
2 parents 5ab2a9f + c5c3c64 commit 5275edf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions find-external/CHOLMOD/FindCHOLMOD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CHOLMOD DEFAULT_MSG CHOLMOD_INCLUDES
CHOLMOD_LIBRARIES CHOLMOD_DEPENDENCIES)

if(CHOLMOD_LIBRARIES)
if(CHOLMOD_LIBRARIES AND NOT TARGET CHOLMOD::CHOLMOD)
add_library(CHOLMOD::CHOLMOD SHARED IMPORTED)
set_target_properties(
CHOLMOD::CHOLMOD
Expand All @@ -107,7 +107,7 @@ if(CHOLMOD_LIBRARIES)
set_target_properties(CHOLMOD::CHOLMOD PROPERTIES IMPORTED_LOCATION_RELEASE
"${CHOLMOD_LIBRARIES}")
endif()
endif(CHOLMOD_LIBRARIES)
endif()

mark_as_advanced(
CHOLMOD_INCLUDES
Expand Down

0 comments on commit 5275edf

Please sign in to comment.