File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,33 @@ set(CMAKE_CXX_STANDARD 17)
88set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
99
1010# Find system dependencies for mcap
11- find_package (PkgConfig REQUIRED)
12- pkg_check_modules(ZSTD REQUIRED libzstd)
13- pkg_check_modules(LZ4 REQUIRED liblz4)
11+ find_package (PkgConfig QUIET )
12+ if (PkgConfig_FOUND)
13+ pkg_check_modules(ZSTD REQUIRED libzstd)
14+ pkg_check_modules(LZ4 REQUIRED liblz4)
15+ else ()
16+ # Fallback: try to find libraries manually
17+ find_library (ZSTD_LIBRARY NAMES zstd libzstd)
18+ find_path (ZSTD_INCLUDE_DIR NAMES zstd.h)
19+ find_library (LZ4_LIBRARY NAMES lz4 liblz4)
20+ find_path (LZ4_INCLUDE_DIR NAMES lz4.h)
21+
22+ if (ZSTD_LIBRARY AND ZSTD_INCLUDE_DIR)
23+ set (ZSTD_FOUND TRUE )
24+ set (ZSTD_LIBRARIES ${ZSTD_LIBRARY} )
25+ set (ZSTD_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR} )
26+ endif ()
27+
28+ if (LZ4_LIBRARY AND LZ4_INCLUDE_DIR)
29+ set (LZ4_FOUND TRUE )
30+ set (LZ4_LIBRARIES ${LZ4_LIBRARY} )
31+ set (LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR} )
32+ endif ()
33+
34+ if (NOT ZSTD_FOUND OR NOT LZ4_FOUND)
35+ message (FATAL_ERROR "Could not find ZSTD or LZ4 libraries. Please install libzstd-dev and liblz4-dev packages." )
36+ endif ()
37+ endif ()
1438
1539if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME} )
1640 option (DATA_TAMER_BUILD_TESTS "Build tests" ON )
You can’t perform that action at this time.
0 commit comments