Meta: Allow lagom_tool invocations to specify libraries to link

This commit is contained in:
Timothy Flynn 2021-11-23 10:18:57 -05:00 committed by Andreas Kling
parent a2ea704d21
commit 4c4b752ab8
Notes: sideshowbarker 2024-07-18 00:46:39 +09:00

View file

@ -1,9 +1,9 @@
function(lagom_tool tool)
cmake_parse_arguments(LAGOM_TOOL "" "" "SOURCES" ${ARGN})
cmake_parse_arguments(LAGOM_TOOL "" "" "SOURCES;LIBS" ${ARGN})
add_executable(${tool} ${SOURCES} ${LAGOM_TOOL_SOURCES})
# alias for parity with exports
add_executable(Lagom::${tool} ALIAS ${tool})
target_link_libraries(${tool} LagomCore)
target_link_libraries(${tool} LagomCore ${LAGOM_TOOL_LIBS})
install(
TARGETS ${tool}
EXPORT LagomTargets