File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,10 @@ endif()
135135if (SUITESPARSE AND SUITESPARSE_FOUND)
136136 SET (GC_HAVE_SUITESPARSE TRUE )
137137 SET (GC_HAVE_SUITESPARSE TRUE PARENT_SCOPE)
138- set (SUITESPARSE_INCLUDE_DIRS "${SUITESPARSE_INCLUDE_DIRS} " PARENT_SCOPE)
139- set (SUITESPARSE_LIBRARIES "${SUITESPARSE_LIBRARIES} " PARENT_SCOPE)
138+ if (NOT TARGET SuiteSparse::spqr)
139+ message (FATAL_ERROR "SuiteSparse::spqr target not found." )
140+ endif ()
141+ set_target_properties (SuiteSparse::spqr PROPERTIES IMPORTED_GLOBAL TRUE )
140142else ()
141143 SET (GC_HAVE_SUITESPARSE FALSE )
142144 SET (GC_HAVE_SUITESPARSE FALSE PARENT_SCOPE)
Original file line number Diff line number Diff line change @@ -187,8 +187,7 @@ target_compile_definitions(geometry-central PUBLIC NOMINMAX _USE_MATH_DEFINES)
187187# Define CMAKE flag used in these sources (but should be kept OUT of headers)
188188if (GC_HAVE_SUITESPARSE)
189189 target_compile_definitions (geometry-central PUBLIC GC_HAVE_SUITESPARSE)
190- target_include_directories (geometry-central PRIVATE ${SUITESPARSE_INCLUDE_DIRS} )
191- target_link_libraries (geometry-central PRIVATE ${SUITESPARSE_LIBRARIES} )
190+ target_link_libraries (geometry-central PRIVATE SuiteSparse::spqr)
192191endif ()
193192
194193# Export symbols if DLL is requested
You can’t perform that action at this time.
0 commit comments