#----------------------------------------------------------------------------
# CREATES AND INSTALLS THE EXE
-IF (NOT ${USE_WXWIDGETS})
- message("You are asking to create a WX application, but the flag USE_WXWIDGETS is OFF.")
- message("Set to ON the flag USE_WXWIDGETS in the root CMakefile.txt of your project. ")
-ENDIF(NOT ${USE_WXWIDGETS})
+IF (USE_WXWIDGETS)
+ set ( ${EXE_NAME}_HAS_GUI true )
+ #set ( ${EXE_NAME}_CONSOLE true )
+ CREA_ADD_EXECUTABLE( ${EXE_NAME} )
+ELSE(USE_WXWIDGETS)
+ message(FATAL_ERROR "You are asking to create a WX application, but the flag USE_WXWIDGETS is OFF.\n Set to ON the flag USE_WXWIDGETS in the root CMakefile.txt of your project. ")
+ENDIF(USE_WXWIDGETS)
+
-set ( ${EXE_NAME}_HAS_GUI true )
-#set ( ${EXE_NAME}_CONSOLE true )
-CREA_ADD_EXECUTABLE( ${EXE_NAME} )
#----------------------------------------------------------------------------