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

FindKLU.cmake: Avoid detecting MSVC libraries when targeting MinGW #476

Merged
merged 2 commits into from
May 15, 2024
Merged
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
4 changes: 2 additions & 2 deletions cmake/tpl/FindKLU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (NOT (KLU_INCLUDE_DIR OR KLU_LIBRARY_DIR OR KLU_LIBRARY))
endif()

# Set library prefixes for Windows
if(WIN32)
if(MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC"))
set(CMAKE_FIND_LIBRARY_PREFIXES lib ${CMAKE_FIND_LIBRARY_PREFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES d.lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
elseif(APPLE)
Expand Down Expand Up @@ -95,7 +95,7 @@ endif ()
if (NOT SUITESPARSECONFIG_LIBRARY)
set(SUITESPARSECONFIG_LIBRARY_NAME suitesparseconfig)
# NOTE: no prefix for this library on windows
if(WIN32 AND NOT MSYS)
if(MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC"))
set(CMAKE_FIND_LIBRARY_PREFIXES "")
endif()
find_library( SUITESPARSECONFIG_LIBRARY ${SUITESPARSECONFIG_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH)
Expand Down
Loading