From cdf8eeb3e272c25e502e04a1740be98513f74b40 Mon Sep 17 00:00:00 2001 From: Victor Tran Date: Mon, 9 Oct 2023 22:27:21 +1100 Subject: [PATCH] Add plugins to build all target instead of parent target --- lib/cmake-scripts/cntp-init.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/cmake-scripts/cntp-init.cmake b/lib/cmake-scripts/cntp-init.cmake index 2667d58..4eebda0 100644 --- a/lib/cmake-scripts/cntp-init.cmake +++ b/lib/cmake-scripts/cntp-init.cmake @@ -35,6 +35,10 @@ function(cntp_init target cxx-standard) endfunction() function(cntp_init_plugin parent target cxx-standard share-subdir) + if(NOT TARGET ${parent}-plugins) + add_custom_target(${parent}-plugins ALL) + endif() + cntp_init(${target} ${cxx-standard}) cntp_install_plugin(${parent} ${target}) @@ -46,5 +50,5 @@ function(cntp_init_plugin parent target cxx-standard share-subdir) CNTP_DATA_SUBDIR ${SHARE_DIR}/plugins/${share-subdir} CNTP_DATA_SUBDIR_WITHOUT_PARENT ${share-subdir} CNTP_PARENT_TARGET ${parent}) - add_dependencies(${parent} ${target}) + add_dependencies(${parent}-plugins ${target}) endfunction()