When cakepkg called from command line without valid CMAKE_INSTALL_PREFIX the default is not set and the check at the end of CakeLoadConfig.cmake allows it since the same code runs when only cake is called which does not need CMAKE_INSTALL_PREFIX
The main problem is that the same config file is used by both the cake and cakepkg while they need completely disjunct set of config variables.