On a second though, the actual error seems to be elsewhere, so still can use proper indexing
if(WIN32 AND NOT UNIX) install(DIRECTORY . DESTINATION ${target_library_install_dir} FILES_MATCHING PATTERN "*.dll" PATTERN "*.ico" )endif(WIN32 AND NOT UNIX)