Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pkg-config files on platforms without import libraries. #390

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,11 @@ if ( NOT MSVC )
set ( CHOLMOD_STATIC_LIBS "${CHOLMOD_STATIC_LIBS} -l${_lib}" )
continue ()
endif ( )
foreach ( _kind IN ITEMS "IMPORT" "SHARED" "STATIC" )
set ( _kinds "SHARED" "STATIC" )
if ( WIN32 )
list ( PREPEND _kinds "IMPORT" )
endif ( )
foreach ( _kind IN LISTS _kinds )
set ( _regex ".*\\/(lib)?([^\\.]*)(${CMAKE_${_kind}_LIBRARY_SUFFIX})" )
if ( ${_lib} MATCHES ${_regex} )
string ( REGEX REPLACE ${_regex} "\\2" _libname ${_lib} )
Expand Down
6 changes: 5 additions & 1 deletion GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,11 @@ if ( NOT MSVC )
set ( GRAPHBLAS_STATIC_LIBS "${GRAPHBLAS_STATIC_LIBS} -l${_lib}" )
continue ()
endif ( )
foreach ( _kind IN ITEMS "IMPORT" "SHARED" "STATIC" )
set ( _kinds "SHARED" "STATIC" )
if ( WIN32 )
list ( PREPEND _kinds "IMPORT" )
endif ( )
foreach ( _kind IN LISTS _kinds )
set ( _regex ".*\\/(lib)?([^\\.]*)(${CMAKE_${_kind}_LIBRARY_SUFFIX})" )
if ( ${_lib} MATCHES ${_regex} )
string ( REGEX REPLACE ${_regex} "\\2" _libname ${_lib} )
Expand Down
16 changes: 10 additions & 6 deletions SPEX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,16 @@ if ( NOT MSVC )
set ( SPEX_STATIC_LIBS_LIST ${SPEX_STATIC_LIBS} )
set ( SPEX_STATIC_LIBS "" )
foreach ( _lib ${SPEX_STATIC_LIBS_LIST} )
string ( FIND ${_lib} "." _pos REVERSE )
if ( ${_pos} EQUAL "-1" )
set ( SPEX_STATIC_LIBS "${SPEX_STATIC_LIBS} -l${_lib}" )
continue ()
endif ( )
foreach ( _kind IN ITEMS "IMPORT" "SHARED" "STATIC" )
string ( FIND ${_lib} "." _pos REVERSE )
if ( ${_pos} EQUAL "-1" )
set ( SPEX_STATIC_LIBS "${SPEX_STATIC_LIBS} -l${_lib}" )
continue ()
endif ( )
set ( _kinds "SHARED" "STATIC" )
if ( WIN32 )
list ( PREPEND _kinds "IMPORT" )
endif ( )
foreach ( _kind IN LISTS _kinds )
set ( _regex ".*\\/(lib)?([^\\.]*)(${CMAKE_${_kind}_LIBRARY_SUFFIX})" )
if ( ${_lib} MATCHES ${_regex} )
string ( REGEX REPLACE ${_regex} "\\2" _libname ${_lib} )
Expand Down
6 changes: 5 additions & 1 deletion SPQR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,11 @@ if ( NOT MSVC )
set ( SPQR_STATIC_LIBS "${SPQR_STATIC_LIBS} -l${_lib}" )
continue ()
endif ( )
foreach ( _kind IN ITEMS "IMPORT" "SHARED" "STATIC" )
set ( _kinds "SHARED" "STATIC" )
if ( WIN32 )
list ( PREPEND _kinds "IMPORT" )
endif ( )
foreach ( _kind IN LISTS _kinds )
set ( _regex ".*\\/(lib)?([^\\.]*)(${CMAKE_${_kind}_LIBRARY_SUFFIX})" )
if ( ${_lib} MATCHES ${_regex} )
string ( REGEX REPLACE ${_regex} "\\2" _libname ${_lib} )
Expand Down
6 changes: 5 additions & 1 deletion UMFPACK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ if ( NOT MSVC )
set ( UMFPACK_STATIC_LIBS "${UMFPACK_STATIC_LIBS} -l${_lib}" )
continue ()
endif ( )
foreach ( _kind IN ITEMS "IMPORT" "SHARED" "STATIC" )
set ( _kinds "SHARED" "STATIC" )
if ( WIN32 )
list ( PREPEND _kinds "IMPORT" )
endif ( )
foreach ( _kind IN LISTS _kinds )
set ( _regex ".*\\/(lib)?([^\\.]*)(${CMAKE_${_kind}_LIBRARY_SUFFIX})" )
if ( ${_lib} MATCHES ${_regex} )
string ( REGEX REPLACE ${_regex} "\\2" _libname ${_lib} )
Expand Down
Loading