Skip to content

Commit 10a8368

Browse files
committed
fix: resolve io standalone dependency configuration
2 parents b128b05 + a515308 commit 10a8368

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# Public Dependencies:
3030
# - vix::error
3131
# - vix::log
32+
# - vix::utils
3233
#
3334
# Installation/Export:
3435
# - Umbrella build exports into: VixTargets
@@ -65,6 +66,7 @@ endif()
6566
# Options
6667
# --------------------------------------------------------------------
6768
option(VIX_IO_FETCH_ERROR "Auto-fetch vix::error if missing" ON)
69+
option(VIX_IO_FETCH_UTILS "Auto-fetch vix::utils if missing" ON)
6870
option(VIX_IO_FETCH_LOG "Auto-fetch vix::log if missing" ON)
6971
option(VIX_IO_BUILD_TESTS "Build io module tests" OFF)
7072
option(VIX_IO_BUILD_EXAMPLES "Build io module examples" OFF)
@@ -79,6 +81,7 @@ set(VIX_IO_HAS_LOCAL_DEPENDENCIES OFF)
7981
# --------------------------------------------------------------------
8082
if (DEFINED VIX_UMBRELLA_BUILD AND VIX_UMBRELLA_BUILD)
8183
set(VIX_IO_FETCH_ERROR OFF CACHE BOOL "Auto-fetch vix::error if missing" FORCE)
84+
set(VIX_IO_FETCH_UTILS OFF CACHE BOOL "Auto-fetch vix::utils if missing" FORCE)
8285
set(VIX_IO_FETCH_LOG OFF CACHE BOOL "Auto-fetch vix::log if missing" FORCE)
8386
endif()
8487

@@ -160,11 +163,22 @@ vix_io_resolve_dependency(
160163
vix_error
161164
VIX_IO_FETCH_ERROR
162165
https://github.com/vixcpp/error.git
163-
v0.1.0
166+
v0.3.1
164167
)
165168

166169
set(VIX_ERROR_TARGET vix::error)
167170

171+
vix_io_resolve_dependency(
172+
utils
173+
vix::utils
174+
vix_utils
175+
VIX_IO_FETCH_UTILS
176+
https://github.com/vixcpp/utils.git
177+
v1.5.2
178+
)
179+
180+
set(VIX_UTILS_TARGET vix::utils)
181+
168182
vix_io_resolve_dependency(
169183
log
170184
vix::log
@@ -196,8 +210,10 @@ if (IO_SOURCES)
196210
target_link_libraries(vix_io
197211
PUBLIC
198212
$<BUILD_INTERFACE:${VIX_ERROR_TARGET}>
213+
$<BUILD_INTERFACE:${VIX_UTILS_TARGET}>
199214
$<BUILD_INTERFACE:${VIX_LOG_TARGET}>
200215
$<INSTALL_INTERFACE:vix::error>
216+
$<INSTALL_INTERFACE:vix::utils>
201217
$<INSTALL_INTERFACE:vix::log>
202218
)
203219

@@ -251,8 +267,10 @@ else()
251267
target_link_libraries(vix_io
252268
INTERFACE
253269
$<BUILD_INTERFACE:${VIX_ERROR_TARGET}>
270+
$<BUILD_INTERFACE:${VIX_UTILS_TARGET}>
254271
$<BUILD_INTERFACE:${VIX_LOG_TARGET}>
255272
$<INSTALL_INTERFACE:vix::error>
273+
$<INSTALL_INTERFACE:vix::utils>
256274
$<INSTALL_INTERFACE:vix::log>
257275
)
258276

@@ -348,6 +366,7 @@ endif()
348366

349367
message(STATUS "Export set: ${VIX_IO_EXPORT_SET}")
350368
message(STATUS "Error target: ${VIX_ERROR_TARGET}")
369+
message(STATUS "Utils target: ${VIX_UTILS_TARGET}")
351370
message(STATUS "Log target: ${VIX_LOG_TARGET}")
352371
message(STATUS "Local deps: ${VIX_IO_HAS_LOCAL_DEPENDENCIES}")
353372
message(STATUS "Tests: ${VIX_IO_BUILD_TESTS}")

cmake/vix_ioConfig.cmake.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
include(CMakeFindDependencyMacro)
44

55
find_dependency(vix_error CONFIG REQUIRED)
6+
find_dependency(vix_utils CONFIG REQUIRED)
7+
find_dependency(vix_log CONFIG REQUIRED)
68

79
include("${CMAKE_CURRENT_LIST_DIR}/vix_ioTargets.cmake")
810

vix.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"id": "vix/error",
4848
"version": "0.3.1"
4949
},
50+
{
51+
"id": "vix/utils",
52+
"version": "1.5.2"
53+
},
5054
{
5155
"id": "vix/log",
5256
"version": "0.1.0"

0 commit comments

Comments
 (0)