Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ae8981a

Browse files
committedJun 16, 2025·
fix windows compilation
1 parent 4883005 commit ae8981a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed
 

‎plotjuggler_plugins/DataLoadMCAP/CMakeLists.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ add_definitions(-DQT_PLUGIN)
33

44
QT5_WRAP_UI ( UI_SRC dialog_mcap.ui )
55

6-
include(${PROJECT_SOURCE_DIR}/cmake/find_or_download_lz4.cmake)
7-
find_or_download_lz4()
8-
9-
include(${PROJECT_SOURCE_DIR}/cmake/find_or_download_zstd.cmake)
10-
find_or_download_zstd()
11-
126
find_package(mcap_vendor QUIET)
137

148
if(mcap_vendor_FOUND)
@@ -17,6 +11,13 @@ if(mcap_vendor_FOUND)
1711
else()
1812
message(STATUS "mcap_vendor not found. Will be downloaded with CPM.")
1913
if(NOT TARGET mcap::mcap)
14+
15+
include(${PROJECT_SOURCE_DIR}/cmake/find_or_download_lz4.cmake)
16+
find_or_download_lz4()
17+
18+
include(${PROJECT_SOURCE_DIR}/cmake/find_or_download_zstd.cmake)
19+
find_or_download_zstd()
20+
2021
### mcap ###
2122
CPMAddPackage(
2223
NAME mcap
@@ -29,6 +30,11 @@ else()
2930
target_include_directories(mcap_lib
3031
PUBLIC $<BUILD_INTERFACE:${mcap_SOURCE_DIR}/cpp/mcap/include>
3132
)
33+
target_link_libraries(mcap_lib
34+
PUBLIC
35+
lz4::lz4
36+
zstd::zstd
37+
)
3238
add_library(mcap::mcap ALIAS mcap_lib)
3339
endif()
3440
endif()
@@ -47,8 +53,6 @@ target_link_libraries(DataLoadMCAP PRIVATE
4753
${Qt5Xml_LIBRARIES}
4854
${Qt5Concurrent_LIBRARIES}
4955
plotjuggler_base
50-
lz4::lz4
51-
zstd::zstd
5256
mcap::mcap
5357

5458
)

0 commit comments

Comments
 (0)
Please sign in to comment.