2024-09-23 16:01:31 +08:00
|
|
|
|
# Copyright (c) 2023, AgiBot Inc.
|
|
|
|
|
# All rights reserved.
|
|
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
|
|
|
|
|
|
message(STATUS "get iceoryx...")
|
|
|
|
|
|
|
|
|
|
# fetch iceoryx
|
|
|
|
|
set(iceoryx_DOWNLOAD_URL
|
|
|
|
|
"https://github.com/eclipse-iceoryx/iceoryx/archive/refs/tags/v2.0.6.tar.gz"
|
|
|
|
|
CACHE STRING "")
|
|
|
|
|
|
|
|
|
|
set(DOWNLOAD_TOML_LIB OFF)
|
|
|
|
|
|
|
|
|
|
if(iceoryx_LOCAL_SOURCE)
|
|
|
|
|
FetchContent_Declare(
|
|
|
|
|
iceoryx
|
|
|
|
|
SOURCE_DIR ${iceoryx_LOCAL_SOURCE}
|
|
|
|
|
OVERRIDE_FIND_PACKAGE)
|
|
|
|
|
else()
|
|
|
|
|
FetchContent_Declare(
|
|
|
|
|
iceoryx
|
|
|
|
|
URL ${iceoryx_DOWNLOAD_URL}
|
|
|
|
|
DOWNLOAD_EXTRACT_TIMESTAMP ON
|
|
|
|
|
OVERRIDE_FIND_PACKAGE)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-11-07 21:17:34 +08:00
|
|
|
|
# Wrap it in a function to restrict the scope of the variables
|
|
|
|
|
function(get_iceoryx)
|
|
|
|
|
FetchContent_GetProperties(iceoryx)
|
|
|
|
|
if(NOT iceoryx_POPULATED)
|
2024-09-23 16:01:31 +08:00
|
|
|
|
|
2024-11-07 21:17:34 +08:00
|
|
|
|
FetchContent_Populate(iceoryx)
|
2024-09-23 16:01:31 +08:00
|
|
|
|
|
2024-11-07 21:17:34 +08:00
|
|
|
|
# iceoryx‘s cmake file in ./iceoryx_meta
|
|
|
|
|
add_subdirectory(${iceoryx_SOURCE_DIR}/iceoryx_meta ${iceoryx_BINARY_DIR})
|
2024-09-23 16:01:31 +08:00
|
|
|
|
|
2024-11-07 21:17:34 +08:00
|
|
|
|
endif()
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
get_iceoryx()
|