# (a good policy is to give the executable the same name that the directory)
#########################
-SET ( EXE_NAME MyExe )
+SET ( EXE_NAME MyExeWx )
#########################
#----------------------------------------------------------------------------
# DEPENDENCIES (LIBRARIES TO LINK WITH)
SET ( ${EXE_NAME}_LINK_LIBRARIES
${crea_LIBRARIES}
- # ${WXWIDGETS_LIBRARIES}
+ ${WXWIDGETS_LIBRARIES}
# ${KWWidgets_LIBRARIES}
# ${VTK_LIBRARIES}
# ${ITK_LIBRARIES}
#----------------------------------------------------------------------------
# CREATES AND INSTALLS THE EXE
-CREA_ADD_WX_EXECUTABLE( ${EXE_NAME} )
+
+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)
+
+
+
#----------------------------------------------------------------------------