From 5a17d089a156a04887156a05ad87a67c53d2f023 Mon Sep 17 00:00:00 2001 From: Dmitry Kargin Date: Mon, 21 Oct 2024 10:50:01 +0300 Subject: [PATCH] [cmake] Fixed handling of external bzip2 --- external/CMakeLists.txt | 6 +++--- src/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index db65ac5..8755c3f 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,6 +1,6 @@ -if (NOT MINIROS_USE_SYSTEM_BZIP) - if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bzip2) +if (NOT MINIROS_USE_SYSTEM_BZIP2) + if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bzip2/CMakeLists.txt) # Disabling bzip2 application. set(ENABLE_LIB_ONLY ON) # Dirty hack to make Python3 fail to find. bzip2 will not build tests without Python3. @@ -34,7 +34,7 @@ if (NOT MINIROS_USE_SYSTEM_BZIP) endif() if (NOT MINIROS_USE_SYSTEM_LZ4) - if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/lz4) + if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/lz4/CMakeLists.txt) set (LZ4_BUILD_CLI OFF) set (LZ4_BUILD_LEGACY_LZ4C OFF) add_subdirectory(lz4/build/cmake EXCLUDE_FROM_ALL) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c29ce9..1717551 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,7 +49,7 @@ if (BZIP2_FOUND) list(APPEND rosbag_INCLUDE ${BZIP2_INCLUDE_DIR}) list(APPEND rosbag_SRC rosbag_storage/bz2_stream.cpp) - if (NOT MINIROS_USE_SYSTEM_BZIP) + if (NOT MINIROS_USE_SYSTEM_BZIP2) list(APPEND rosbag_LIBS bz2_import) else () list(APPEND rosbag_LIBS ${BZIP2_LIBRARIES})