Cmake error when building a new C++ loadable extension module

Operating system: Windows
Slicer version: 4.7
CMake: 3.8.2

I added a new module using the extension manager and the module is set to be a loadable module. Try to build the extension using CMake. The Slicer_DIR was set to be the Slicer_build directory in CMake.
I got the following error in CMake:

CMake Error at Logic/CMakeLists.txt:20 (SlicerMacroBuildModuleLogic):
Unknown CMake command
“SlicerMacroBuildModuleLogic”

Could you please let me know what is missing here?

Thanks,

Shelly

So many things have been changed, fixed, and improved since 4.7 that probably none of the developers would want to go back and investigate issues in that old version.

Could you update to the latest master version and see if you can reproduce the issue?