From 7294b44a2029e8a4c70a041b8860a162e7c146ea Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sat, 19 Dec 2020 17:12:18 -0800 Subject: [PATCH] Blosc: Hint unix-like prefix on Windows Simplest way to add a search for this alternate name (instead of changing CMAKE_FIND_LIBRARY_PREFIXES). --- cmake/FindBlosc.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake index 6f4ce2f951..71cc9bfe50 100644 --- a/cmake/FindBlosc.cmake +++ b/cmake/FindBlosc.cmake @@ -37,9 +37,14 @@ if(NOT BLOSC_FOUND) NO_DEFAULT_PATHS ) endif() + if(WIN32) # uses a Unix-like library prefix on Windows + set(BLOSC_LIBRARY_OPTS + libblosc ${BLOSC_LIBRARY_OPTS} + ) + endif() find_path(BLOSC_INCLUDE_DIR blosc.h ${BLOSC_INCLUDE_OPTS}) - find_library(BLOSC_LIBRARY blosc ${BLOSC_LIBRARY_OPTS}) + find_library(BLOSC_LIBRARY NAMES blosc ${BLOSC_LIBRARY_OPTS}) if(BLOSC_INCLUDE_DIR) file(STRINGS ${BLOSC_INCLUDE_DIR}/blosc.h _ver_string REGEX [=[BLOSC_VERSION_STRING +"[^"]*"]=]