Merge pull request #646 from google/master

draco: Fix empty list handling in older CMakes.
This commit is contained in:
Tom Finegan 2020-12-01 14:44:59 -08:00 committed by GitHub
commit 4771872689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,8 +331,13 @@ macro(draco_add_library)
endif()
# Determine if $lib_NAME is a header only target.
set(sources_list ${lib_SOURCES})
list(FILTER sources_list INCLUDE REGEX cc$)
unset(sources_list)
if(lib_SOURCES)
set(sources_list ${lib_SOURCES})
list(FILTER sources_list INCLUDE REGEX cc$)
endif()
if(NOT sources_list)
if(NOT XCODE)
# This is a header only target. Tell CMake the link language.