Fixed wrong ENDIF in the CMakeList