$<BUILD_INTERFACE:...>
expects a list as argument. For that purpose, use a;
as separator of the arguments or, better, use genex $<SEMICOLON>
. So the correct expression is:
target_include_directories(testlib
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include1$<SEMICOLON>${CMAKE_SOURCE_DIR}/include2>
$<INSTALL_INTERFACE:include2>
PRIVATE
include
)