Skip to content

Commit

Permalink
[cmake] Fixed handling of external bzip2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kargin authored and Dmitry Kargin committed Oct 21, 2024
1 parent e41de4e commit 5a17d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 5a17d08

Please sign in to comment.