From 583f2635dcee425a508ac63a9e73fcff4f81d808 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 22 Sep 2025 12:47:00 -0400 Subject: [PATCH] nix build: xo-reader: build + install docs+examples + build fix --- CMakeLists.txt | 7 +++++++ examples/exprrepl/CMakeLists.txt | 2 +- examples/exprreplxx/CMakeLists.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c88ff68..7e9e339f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,13 @@ add_subdirectory(examples) add_subdirectory(utest) xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets) +# ---------------------------------------------------------------- + +if (XO_ENABLE_EXAMPLES) + install(TARGETS xo_expression_repl DESTINATION bin/xo/example/reader) + install(TARGETS xo_expression_replxx DESTINATION bin/xo/example/reader) +endif() + # ---------------------------------------------------------------- # docs targets depends on other library/utest/exec targets, # must come after them diff --git a/examples/exprrepl/CMakeLists.txt b/examples/exprrepl/CMakeLists.txt index 9296f119..003c9cb0 100644 --- a/examples/exprrepl/CMakeLists.txt +++ b/examples/exprrepl/CMakeLists.txt @@ -5,7 +5,7 @@ set(SELF_SRCS exprrepl.cpp) if (XO_ENABLE_EXAMPLES) xo_add_executable(${SELF_EXE} ${SELF_SRCS}) - xo_dependency(${SELF_EXE} xo_reader) + xo_self_dependency(${SELF_EXE} xo_reader) endif() # end CMakeLists.txt diff --git a/examples/exprreplxx/CMakeLists.txt b/examples/exprreplxx/CMakeLists.txt index da33e668..c7365632 100644 --- a/examples/exprreplxx/CMakeLists.txt +++ b/examples/exprreplxx/CMakeLists.txt @@ -5,7 +5,7 @@ set(SELF_SRCS exprreplxx.cpp) if (XO_ENABLE_EXAMPLES) xo_add_executable(${SELF_EXE} ${SELF_SRCS}) - xo_dependency(${SELF_EXE} xo_reader) + xo_self_dependency(${SELF_EXE} xo_reader) xo_external_target_dependency(${SELF_EXE} replxx replxx::replxx) find_package(Threads REQUIRED)