Skip to content

Commit

Permalink
Add plugins to build all target instead of parent target
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Oct 9, 2023
1 parent a96cbda commit cdf8eeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cmake-scripts/cntp-init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand All @@ -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()

0 comments on commit cdf8eeb

Please sign in to comment.