Skip to content

Commit

Permalink
CMake: Don't use pkgconfig when cross-compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
neobrain committed Sep 6, 2024
1 parent 355c342 commit ab5d3ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ find_package(Python 3.0 REQUIRED COMPONENTS Interpreter)
set(BUILD_SHARED_LIBS OFF)

pkg_search_module(xxhash IMPORTED_TARGET xxhash libxxhash)
if (TARGET PkgConfig::xxhash)
if (TARGET PkgConfig::xxhash AND NOT CMAKE_CROSSCOMPILING)
add_library(xxHash::xxhash ALIAS PkgConfig::xxhash)
else()
set(XXHASH_BUNDLED_MODE TRUE)
Expand Down

0 comments on commit ab5d3ab

Please sign in to comment.