mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-14 02:05:57 +08:00
draco: Fix empty list handling in older CMakes.
Older CMake releases don't support empty list variables with list(FILTER).
This commit is contained in:
parent
8a979f79a5
commit
dd6ef6ff02
@ -331,8 +331,13 @@ macro(draco_add_library)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Determine if $lib_NAME is a header only target.
|
# Determine if $lib_NAME is a header only target.
|
||||||
set(sources_list ${lib_SOURCES})
|
unset(sources_list)
|
||||||
list(FILTER sources_list INCLUDE REGEX cc$)
|
|
||||||
|
if(lib_SOURCES)
|
||||||
|
set(sources_list ${lib_SOURCES})
|
||||||
|
list(FILTER sources_list INCLUDE REGEX cc$)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT sources_list)
|
if(NOT sources_list)
|
||||||
if(NOT XCODE)
|
if(NOT XCODE)
|
||||||
# This is a header only target. Tell CMake the link language.
|
# This is a header only target. Tell CMake the link language.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user