From 2ff5ab3fc97ff8899a178a96af93b464c7bf6a41 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 27 Feb 2026 13:04:46 +1100 Subject: [PATCH] nix-build: + xo-object2 builds --- cmake/xo_macros/xo_cxx.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/xo_macros/xo_cxx.cmake b/cmake/xo_macros/xo_cxx.cmake index 38d01df..9c70505 100644 --- a/cmake/xo_macros/xo_cxx.cmake +++ b/cmake/xo_macros/xo_cxx.cmake @@ -1748,6 +1748,18 @@ function(xo_add_genfacetimpl) if (NOT DEFINED GF_FACET_PKG) message(FATAL_ERROR "xo_add_genfacetimpl: FACET_PKG or FACET_DIR required") else() + # share_${GF_FACET_PKG} is a cmake target created by xo_add_shared_library4() + # or similar when a facet-provider (e.g. xo-gc) builds from source in the same + # cmake context (XO_SUBMODULE_BUILD=True). + # + # It is NOT exported in the installed cmake + # config, so it won't exist when the facet package is consumed as an installed + # dependency (e.g. in a standalone nix build). + # + if(NOT TARGET share_${GF_FACET_PKG}) + message(STATUS "xo_add_genfacetimpl: share_${GF_FACET_PKG} not available; skipping ${GF_TARGET}") + return() + endif() get_target_property(_facet_dir share_${GF_FACET_PKG} path) set(GF_FACET_DIR ${_facet_dir}) endif()