Skip to content

Commit

Permalink
only add /Include workaround if the directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Dec 6, 2023
1 parent b177d27 commit a667148
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions cmake_modules/FindGraphBLAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,16 @@ if ( GraphBLAS_FOUND )
# (did not have "/Include")
get_property ( _inc TARGET SuiteSparse::GraphBLAS PROPERTY
INTERFACE_INCLUDE_DIRECTORIES )
if ( "${_graphblas_aliased}" STREQUAL "" )
target_include_directories ( SuiteSparse::GraphBLAS INTERFACE
${_inc}/Include )
else ( )
target_include_directories ( ${_graphblas_aliased} INTERFACE
${_inc}/Include )
if ( IS_DIRECTORY ${_inc}/Include )
if ( "${_graphblas_aliased}" STREQUAL "" )
target_include_directories ( SuiteSparse::GraphBLAS INTERFACE
${_inc}/Include )
else ( )
target_include_directories ( ${_graphblas_aliased} INTERFACE
${_inc}/Include )
endif ( )
message ( STATUS "additional include: ${_inc}/Include" )
endif ( )
message ( STATUS "additional include: ${_inc}/Include" )
endif ( )
if ( "${_graphblas_aliased}" STREQUAL "" )
add_library ( GraphBLAS::GraphBLAS ALIAS SuiteSparse::GraphBLAS )
Expand All @@ -112,14 +114,16 @@ if ( GraphBLAS_FOUND )
# (did not have "/Include")
get_property ( _inc TARGET SuiteSparse::GraphBLAS_static PROPERTY
INTERFACE_INCLUDE_DIRECTORIES )
if ( "${_graphblas_aliased}" STREQUAL "" )
target_include_directories ( SuiteSparse::GraphBLAS_static INTERFACE
${_inc}/Include )
else ( )
target_include_directories ( ${_graphblas_aliased} INTERFACE
${_inc}/Include )
if ( IS_DIRECTORY ${_inc}/Include )
if ( "${_graphblas_aliased}" STREQUAL "" )
target_include_directories ( SuiteSparse::GraphBLAS_static INTERFACE
${_inc}/Include )
else ( )
target_include_directories ( ${_graphblas_aliased} INTERFACE
${_inc}/Include )
endif ( )
message ( STATUS "additional include: ${_inc}/Include" )
endif ( )
message ( STATUS "additional include: ${_inc}/Include" )
endif ( )
if ( "${_graphblas_aliased}" STREQUAL "" )
add_library ( GraphBLAS::GraphBLAS_static ALIAS SuiteSparse::GraphBLAS_static )
Expand Down

0 comments on commit a667148

Please sign in to comment.