Skip to content

Commit

Permalink
Move umfpack target to SuiteSparse:: namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Jul 22, 2023
1 parent fa62e91 commit 9240b11
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions Example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,14 @@ else ( )
endif ( )

# umfpack:
target_link_libraries ( my PRIVATE umfpack )
target_link_libraries ( my_cxx PRIVATE umfpack )
if ( TARGET umfpack_static )
target_link_libraries ( my_static PUBLIC umfpack_static )
target_link_libraries ( my_cxx_static PUBLIC umfpack_static )
target_link_libraries ( my PRIVATE SuiteSparse::umfpack )
target_link_libraries ( my_cxx PRIVATE SuiteSparse::umfpack )
if ( TARGET SuiteSparse::umfpack_static )
target_link_libraries ( my_static PUBLIC SuiteSparse::umfpack_static )
target_link_libraries ( my_cxx_static PUBLIC SuiteSparse::umfpack_static )
else ( )
target_link_libraries ( my_static PUBLIC umfpack )
target_link_libraries ( my_cxx_static PUBLIC umfpack )
target_link_libraries ( my_static PUBLIC SuiteSparse::umfpack )
target_link_libraries ( my_cxx_static PUBLIC SuiteSparse::umfpack )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions UMFPACK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,12 @@ endif ( )

# create (temporary) export target file during build
export ( EXPORT UMFPACKTargets
NAMESPACE SuiteSparse::
FILE ${CMAKE_CURRENT_BINARY_DIR}/UMFPACKTargets.cmake )

# install export target, config and version files for find_package
install ( EXPORT UMFPACKTargets
NAMESPACE SuiteSparse::
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/UMFPACK )

configure_package_config_file (
Expand Down
8 changes: 4 additions & 4 deletions UMFPACK/Config/UMFPACKConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

# Finds the UMFPACK include file and compiled library.
# The following targets are defined:
# umfpack - for the shared library (if available)
# umfpack_static - for the static library (if available)
# SuiteSparse::umfpack - for the shared library (if available)
# SuiteSparse::umfpack_static - for the static library (if available)

# For backward compatibility the following variables are set:

Expand All @@ -39,8 +39,8 @@ include ( ${CMAKE_CURRENT_LIST_DIR}/UMFPACKTargets.cmake )

# The following is only for backward compatibility with FindUMFPACK.

set ( _target_shared umfpack )
set ( _target_static umfpack_static )
set ( _target_shared SuiteSparse::umfpack )
set ( _target_static SuiteSparse::umfpack_static )
set ( _var_prefix "UMFPACK" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
Expand Down

0 comments on commit 9240b11

Please sign in to comment.