build: Fix plugins not being compiled at all anymore

This commit is contained in:
WerWolv 2021-05-29 23:06:36 +02:00
parent c22d1033eb
commit 8850d42246
1 changed files with 1 additions and 1 deletions

View File

@ -161,8 +161,8 @@ endmacro()
macro(createPackage)
file(MAKE_DIRECTORY "plugins")
foreach (plugin IN LISTS PLUGINS)
add_subdirectory("plugins/${plugin}")
if (TARGET ${plugin})
add_subdirectory("plugins/${plugin}")
set_target_properties(${plugin} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
install(TARGETS ${plugin} RUNTIME DESTINATION ${PLUGINS_INSTALL_LOCATION})
add_dependencies(imhex ${plugin})