Skip to content

Commit

Permalink
Merge pull request #1897 from danrbailey/windows_static
Browse files Browse the repository at this point in the history
Fix Windows Static Build
  • Loading branch information
danrbailey authored Sep 16, 2024
2 parents 383aa15 + 26c45dd commit 8ea30d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
23 changes: 0 additions & 23 deletions cmake/FindBlosc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,6 @@ list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
${SYSTEM_LIBRARY_PATHS}
)

# Library suffix handling

set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})

if(MSVC)
if(BLOSC_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};lib")
endif()
else()
if(BLOSC_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
endif()
endif()

set(Blosc_LIB_COMPONENTS "")
# NOTE: Search for debug version first (see vcpkg hack)
list(APPEND BLOSC_BUILD_TYPES DEBUG RELEASE)
Expand Down Expand Up @@ -246,13 +230,6 @@ foreach(BUILD_TYPE ${BLOSC_BUILD_TYPES})
set(CMAKE_IGNORE_PATH ${_BLOSC_CMAKE_IGNORE_PATH})
endforeach()

# Reset library suffix

set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_PREFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES})
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES)

if(Blosc_LIBRARY_DEBUG AND Blosc_LIBRARY_RELEASE)
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
# single-config generators, set optimized and debug libraries
Expand Down
2 changes: 2 additions & 0 deletions pendingchanges/windows_static_blosc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Build:
- Fixed an issue with the Blosc CMake FindPackage for the OpenVDB Windows static library.

0 comments on commit 8ea30d5

Please sign in to comment.