cmake: fix build error

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-09-07 13:44:08 +08:00
parent 5d494453bc
commit 6fe35a667e
1 changed files with 5 additions and 1 deletions

View File

@ -73,7 +73,11 @@ endfunction()
function(setup_package_export arg_target arg_path arg_public arg_alias arg_private)
include(GNUInstallDirs)
install(TARGETS ${arg_target}
set(__targets ${arg_target})
if(TARGET ${arg_target}_resources_1)
list(APPEND __targets ${arg_target}_resources_1)
endif()
install(TARGETS ${__targets}
EXPORT ${arg_target}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}