Skip to content

Commit d4c2962

Browse files
authored
Add export support
This makes sdbus-c++ consumable from the build tree without the need for an explicit installation. This can be very handy for e.g. testing purposes. Crucially, downstream projects will depend on upstream to properly export everything. Otherwise, they can't be built as static libraries, even if sdbus-c++ is only a private dependency. See also https://runebook.dev/en/docs/cmake/command/export
1 parent 6715ef1 commit d4c2962

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ if(SDBUSCPP_INSTALL)
313313
endif()
314314
endif()
315315

316+
export(TARGETS ${EXPORT_SET}
317+
NAMESPACE SDBusCpp::
318+
FILE sdbus-c++-targets
319+
)
320+
316321
#----------------------------------
317322
# CPACK
318323
#----------------------------------

0 commit comments

Comments
 (0)