Skip to content

Commit

Permalink
Add in a library prefix for lz4 from conda on Windows. (#1846)
Browse files Browse the repository at this point in the history
* Add in a library prefix for lz4 from conda on Windows.

The comment explains why we need to do this.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Oct 30, 2024
1 parent 786c3c4 commit ee7f68a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions liblz4_vendor/cmake/Modules/Findlz4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ if(NOT lz4_ROOT_DIR AND DEFINED ENV{lz4_ROOT_DIR})
"lz4 base directory location (optional, used for nonstandard installation paths)")
endif()

# When using lz4 from conda on Windows, and cmake before 3.29.0,
# we need to add the library prefix "lib" so that the library can
# be successfully found.
if(MSVC AND CMAKE_VERSION VERSION_LESS "3.29.0")
set(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
endif()

# Search path for nonstandard package locations
if(lz4_ROOT_DIR)
set(lz4_INCLUDE_PATH PATHS "${lz4_ROOT_DIR}/include" NO_DEFAULT_PATH)
Expand Down

0 comments on commit ee7f68a

Please sign in to comment.