This replaces some workarounds and manual logic with new features
available with CMake 3.16, including list(FILTER), list(JOIN),
foreach(IN LISTS) and enable_language(OBJC). Policy settings no longer
needed with 3.16 have been removed.
Related to #2541