[CMake] Factorized target libraries definitions.