Skip to content

Commit b177d27

Browse files
sync
1 parent d5c547a commit b177d27

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

cmake_modules/FindGraphBLAS.cmake

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,41 +80,51 @@ if ( GraphBLAS_FOUND )
8080
message ( STATUS "Found SuiteSparse::GraphBLAS" )
8181
get_property ( _graphblas_aliased TARGET SuiteSparse::GraphBLAS
8282
PROPERTY ALIASED_TARGET )
83-
if ( "${_graphblas_aliased}" STREQUAL "" )
84-
add_library ( GraphBLAS::GraphBLAS ALIAS SuiteSparse::GraphBLAS )
85-
else ( )
86-
add_library ( GraphBLAS::GraphBLAS ALIAS ${_graphblas_aliased} )
87-
endif ( )
8883
if ( GRAPHBLAS_VERSION LESS "8.3.0" AND _lagraph_gb_common_tree )
8984
# workaround for incorrect INTERFACE_INCLUDE_DIRECTORIES of
9085
# SuiteSparse:GraphBLAS 8.2.x before installation
9186
# (did not have "/Include")
92-
get_property ( _inc TARGET GraphBLAS::GraphBLAS PROPERTY
87+
get_property ( _inc TARGET SuiteSparse::GraphBLAS PROPERTY
9388
INTERFACE_INCLUDE_DIRECTORIES )
94-
target_include_directories ( GraphBLAS::GraphBLAS INTERFACE
95-
${_inc}/Include )
89+
if ( "${_graphblas_aliased}" STREQUAL "" )
90+
target_include_directories ( SuiteSparse::GraphBLAS INTERFACE
91+
${_inc}/Include )
92+
else ( )
93+
target_include_directories ( ${_graphblas_aliased} INTERFACE
94+
${_inc}/Include )
95+
endif ( )
9696
message ( STATUS "additional include: ${_inc}/Include" )
9797
endif ( )
98+
if ( "${_graphblas_aliased}" STREQUAL "" )
99+
add_library ( GraphBLAS::GraphBLAS ALIAS SuiteSparse::GraphBLAS )
100+
else ( )
101+
add_library ( GraphBLAS::GraphBLAS ALIAS ${_graphblas_aliased} )
102+
endif ( )
98103
endif ( )
99104
if ( TARGET SuiteSparse::GraphBLAS_static )
100105
message ( STATUS "Found SuiteSparse::GraphBLAS_static" )
101106
# It's not possible to create an alias of an alias.
102107
get_property ( _graphblas_aliased TARGET SuiteSparse::GraphBLAS_static
103108
PROPERTY ALIASED_TARGET )
104-
if ( "${_graphblas_aliased}" STREQUAL "" )
105-
add_library ( GraphBLAS::GraphBLAS_static ALIAS SuiteSparse::GraphBLAS_static )
106-
else ( )
107-
add_library ( GraphBLAS::GraphBLAS_static ALIAS ${_graphblas_aliased} )
108-
endif ( )
109109
if ( GRAPHBLAS_VERSION LESS "8.3.0" AND _lagraph_gb_common_tree )
110110
# workaround for incorrect INTERFACE_INCLUDE_DIRECTORIES of
111111
# SuiteSparse:GraphBLAS 8.2.x before installation
112112
# (did not have "/Include")
113-
get_property ( _inc TARGET GraphBLAS::GraphBLAS_static PROPERTY
113+
get_property ( _inc TARGET SuiteSparse::GraphBLAS_static PROPERTY
114114
INTERFACE_INCLUDE_DIRECTORIES )
115-
target_include_directories ( GraphBLAS::GraphBLAS_static INTERFACE
116-
${_inc}/Include )
117-
message ( STATUS "additional include: ${_inc}/Include" )
115+
if ( "${_graphblas_aliased}" STREQUAL "" )
116+
target_include_directories ( SuiteSparse::GraphBLAS_static INTERFACE
117+
${_inc}/Include )
118+
else ( )
119+
target_include_directories ( ${_graphblas_aliased} INTERFACE
120+
${_inc}/Include )
121+
endif ( )
122+
message ( STATUS "additional include: ${_inc}/Include" )
123+
endif ( )
124+
if ( "${_graphblas_aliased}" STREQUAL "" )
125+
add_library ( GraphBLAS::GraphBLAS_static ALIAS SuiteSparse::GraphBLAS_static )
126+
else ( )
127+
add_library ( GraphBLAS::GraphBLAS_static ALIAS ${_graphblas_aliased} )
118128
endif ( )
119129
endif ( )
120130
return ( )

0 commit comments

Comments
 (0)