Windows: Add missing swiftshader binaries to distribution (issue #2291)

This commit is contained in:
Marshall Greenblatt
2017-10-30 14:41:37 -04:00
parent c506c8c5c0
commit 486e69e23b
4 changed files with 44 additions and 15 deletions

View File

@ -101,7 +101,19 @@ macro(COPY_FILES target file_list source_dir target_dir)
set(source_file ${source_dir}/${FILENAME})
get_filename_component(target_name ${FILENAME} NAME)
set(target_file ${target_dir}/${target_name})
if(IS_DIRECTORY ${source_file})
string(FIND ${source_file} "$<CONFIGURATION>" pos)
if(pos GREATER_EQUAL 0)
# Must test with an actual configuration directory.
string(REPLACE "$<CONFIGURATION>" "Release" existing_source_file ${source_file})
if(NOT EXISTS ${existing_source_file})
string(REPLACE "$<CONFIGURATION>" "Debug" existing_source_file ${source_file})
endif()
else()
set(existing_source_file ${source_file})
endif()
if(IS_DIRECTORY ${existing_source_file})
add_custom_command(
TARGET ${target}
POST_BUILD