From 3831e387a9d1102da1bad9eabbc80de384d45fe6 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 22 Oct 2023 14:45:18 -0400 Subject: [PATCH] indentlog: need unique cmake targets across xo for submodule build --- CMakeLists.txt | 8 ++++---- example/ex1/CMakeLists.txt | 4 ++-- example/ex2/CMakeLists.txt | 6 ++++-- example/ex3/CMakeLists.txt | 4 ++-- example/ex4/CMakeLists.txt | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c6799082..65572cc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,7 @@ xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets # ---------------------------------------------------------------- install(TARGETS hello DESTINATION bin/indentlog/example) -install(TARGETS ex1 DESTINATION bin/indentlog/example) -install(TARGETS ex2 DESTINATION bin/indentlog/example) -install(TARGETS ex3 DESTINATION bin/indentlog/example) -install(TARGETS ex4 DESTINATION bin/indentlog/example) +install(TARGETS indentlog_ex1 DESTINATION bin/indentlog/example) +install(TARGETS indentlog_ex2 DESTINATION bin/indentlog/example) +install(TARGETS indentlog_ex3 DESTINATION bin/indentlog/example) +install(TARGETS indentlog_ex4 DESTINATION bin/indentlog/example) diff --git a/example/ex1/CMakeLists.txt b/example/ex1/CMakeLists.txt index a9d1b27d..f42c56de 100644 --- a/example/ex1/CMakeLists.txt +++ b/example/ex1/CMakeLists.txt @@ -1,2 +1,2 @@ -add_executable(ex1 ex1.cpp) -xo_include_options2(ex1) +add_executable(indentlog_ex1 ex1.cpp) +xo_include_options2(indentlog_ex1) diff --git a/example/ex2/CMakeLists.txt b/example/ex2/CMakeLists.txt index 20026b03..2dc39192 100644 --- a/example/ex2/CMakeLists.txt +++ b/example/ex2/CMakeLists.txt @@ -1,2 +1,4 @@ -add_executable(ex2 ex2.cpp) -xo_include_options2(ex2) +# NOTE: need target names to be globally unique within the xo umbrella + +add_executable(indentlog_ex2 ex2.cpp) +xo_include_options2(indentlog_ex2) diff --git a/example/ex3/CMakeLists.txt b/example/ex3/CMakeLists.txt index 9791a931..bb5110ce 100644 --- a/example/ex3/CMakeLists.txt +++ b/example/ex3/CMakeLists.txt @@ -1,2 +1,2 @@ -add_executable(ex3 ex3.cpp) -xo_include_options2(ex3) +add_executable(indentlog_ex3 ex3.cpp) +xo_include_options2(indentlog_ex3) diff --git a/example/ex4/CMakeLists.txt b/example/ex4/CMakeLists.txt index 2a6b9c31..6ff720f7 100644 --- a/example/ex4/CMakeLists.txt +++ b/example/ex4/CMakeLists.txt @@ -1,2 +1,2 @@ -add_executable(ex4 ex4.cpp) -xo_include_options2(ex4) +add_executable(indentlog_ex4 ex4.cpp) +xo_include_options2(indentlog_ex4)