File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,9 @@ set(CMAKE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_LINKER_FLAGS_RELWITHDEBINFO} -fno
303303set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer" )
304304set (CMAKE_LINKER_FLAGS_RELEASE "${CMAKE_LINKER_FLAGS_RELEASE} -fomit-frame-pointer" )
305305
306+ ## Modules ##
307+ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /CMakeModules/)
308+
306309include_directories (External/robin-map/include /)
307310
308311include (CTest)
@@ -325,10 +328,8 @@ find_package(Python 3.9 REQUIRED COMPONENTS Interpreter)
325328
326329set (BUILD_SHARED_LIBS OFF )
327330
328- pkg_search_module(xxhash IMPORTED_TARGET xxhash libxxhash)
329- if (TARGET PkgConfig::xxhash AND NOT CMAKE_CROSSCOMPILING )
330- add_library (xxHash::xxhash ALIAS PkgConfig::xxhash)
331- else ()
331+ find_package (xxhash MODULE QUIET )
332+ if (NOT TARGET xxHash::xxhash)
332333 set (XXHASH_BUNDLED_MODE TRUE )
333334 set (XXHASH_BUILD_XXHSUM FALSE )
334335 add_subdirectory (External/xxhash/cmake_unofficial/)
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: MIT
2+
3+ include (FindPackageHandleStandardArgs)
4+
5+ find_package (PkgConfig QUIET )
6+ pkg_search_module(xxhash QUIET IMPORTED_TARGET xxhash libxxhash)
7+ find_package_handle_standard_args(xxhash
8+ REQUIRED_VARS xxhash_LINK_LIBRARIES
9+ VERSION_VAR xxhash_VERSION
10+ )
11+
12+ if (xxhash_FOUND AND NOT TARGET xxHash::xxhash)
13+ if (TARGET xxhash)
14+ add_library (xxHash::xxhash ALIAS xxhash)
15+ else ()
16+ add_library (xxHash::xxhash ALIAS PkgConfig::xxhash)
17+ endif ()
18+ endif ()
You can’t perform that action at this time.
0 commit comments