Only create symlinks if directory exists.
@@ -551,7 +551,7 @@ endfunction()
function(install_java_artifact_dependencies NAME)
install(DIRECTORY "target/dependency/" DESTINATION lib/jars/${NAME} FILES_MATCHING PATTERN "*.jar")
- install(CODE "execute_process(COMMAND bash -c \"cd \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib/jars && ln -sf ${NAME}/*.jar .\")")
+ install(CODE "execute_process(COMMAND bash -c \"cd \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib/jars && if [ -d ${NAME} ]; then ln -sf ${NAME}/*.jar . ; fi\")")
endfunction()
function(install_fat_java_artifact NAME)
