Cross-compilation is not for the faint of heart.
CMake is ... hilariously tricky to deal with at the best of times.
I'll let you figure out what happens when you combine the two

.
As a rather strong hint, look at:
https://github.com/koreader/koreader...akeCross.cmake