Improve CMake template for native components