SUBDIRS(creaNewProject)
IF(WIN32)
-# SUBDIRS(creaSed)
+ SUBDIRS(creaSed)
ENDIF(WIN32)
--- /dev/null
+# Add a SUBDIRS command for each of your applications
+# SUBDIRS(myapp1)
+# SUBDIRS(myapp2)
goto END
:ERROR02
-echo "ERROR : Directory '%OUTPUT%/%PROJECT%' already exists !"
+echo "ERROR : Directory '%OUTPUT%/%PROJECT%' already exists !"
goto end
:END
-
+pause
SET(creaSed_SOURCES creaSed)
+SET(creaSed_HAS_GUI OFF)
CREA_ADD_EXECUTABLE(creaSed)
+#Generates the cmake commands to build and install the executable EXE_NAME.
+# ${EXE_NAME}_SOURCES must contain the list of files to compile
+# to build the executable.
+# ${EXE_NAME}_LINK_LIBRARIES must contain the list of libraries to link with
+#
+# On Windows:
+# if ${EXE_NAME}_HAS_GUI is set to TRUE then a Win32 application is generated
+# if ${EXE_NAME}_CONSOLE is set to TRUE then the application will have a console attached.
MACRO(CREA_ADD_EXECUTABLE EXE_NAME)
IF(CREA_VERBOSE_CMAKE)
MESSAGE(STATUS "Configuring executable ${EXE_NAME}")
MESSAGE(STATUS " Sources : ${${EXE_NAME}_SOURCES}")
MESSAGE(STATUS " Link libs: ${${EXE_NAME}_LINK_LIBRARIES}")
+ IF(WIN32)
+ MESSAGE(STATUS " Win32 app: ${${EXE_NAME}_HAS_GUI}")
+ MESSAGE(STATUS " Console : ${${EXE_NAME}_CONSOLE}")
+ ENDIF(WIN32)
MESSAGE(STATUS "===============================================")
ENDIF(CREA_VERBOSE_CMAKE)
- IF(WIN32)
- ADD_EXECUTABLE(${EXE_NAME} WIN32 ${${EXE_NAME}_SOURCES})
- ELSE(WIN32)
+ IF(WIN32 AND ${EXE_NAME}_HAS_GUI )
+ ADD_EXECUTABLE(${EXE_NAME} WIN32 ${${EXE_NAME}_SOURCES})
+ IF( ${${EXE_NAME}_CONSOLE} )
+ SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES LINK_FLAGS /subsystem:console )
+ ENDIF( ${${EXE_NAME}_CONSOLE} )
+ ELSE(WIN32 AND ${EXE_NAME}_HAS_GUI )
ADD_EXECUTABLE(${EXE_NAME} ${${EXE_NAME}_SOURCES})
- ENDIF(WIN32)
+ ENDIF(WIN32 AND ${EXE_NAME}_HAS_GUI )
TARGET_LINK_LIBRARIES(${EXE_NAME} ${${EXE_NAME}_LINK_LIBRARIES})
+++ /dev/null
-#Generates the cmake commands to build and install the executable EXE_NAME.
-# ${EXE_NAME}_SOURCES must contain the list of files to compile
-# to build the executable.
-# ${EXE_NAME}_LINK_LIBRARIES must contain the list of libraries to link with
-#
-# On Windows, if ${EXE_NAME}_CONSOLE is set to TRUE
-# then the application will have a console attached.
-MACRO(CREA_ADD_WX_EXECUTABLE EXE_NAME)
-
-
- IF(USE_WXWIDGETS)
- IF(CREA_VERBOSE_CMAKE)
- MESSAGE(STATUS "===============================================")
- MESSAGE(STATUS "Configuring wx executable ${EXE_NAME}")
- MESSAGE(STATUS " Sources : ${${EXE_NAME}_SOURCES}")
- MESSAGE(STATUS " Link libs: ${${EXE_NAME}_LINK_LIBRARIES}")
- IF(WIN32)
- MESSAGE(STATUS " Console : ${${EXE_NAME}_CONSOLE}")
- ENDIF(WIN32)
- MESSAGE(STATUS "===============================================")
- ENDIF(CREA_VERBOSE_CMAKE)
-
-
- IF(WIN32)
- ADD_EXECUTABLE(${EXE_NAME} WIN32 ${${EXE_NAME}_SOURCES})
- IF( ${${EXE_NAME}_CONSOLE} )
- SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES LINK_FLAGS /subsystem:console )
- ENDIF( ${${EXE_NAME}_CONSOLE} )
- ELSE(WIN32)
- ADD_EXECUTABLE(${EXE_NAME} ${${EXE_NAME}_SOURCES})
- ENDIF(WIN32)
-
- TARGET_LINK_LIBRARIES(${EXE_NAME} ${${EXE_NAME}_LINK_LIBRARIES})
- INSTALL_TARGETS(/bin/ ${EXE_NAME})
- ENDIF(USE_WXWIDGETS)
-
-
-
-ENDMACRO(CREA_ADD_WX_EXECUTABLE)
-
-
INCLUDE( ${CREA_CMAKE_DIR}/CREAMacro_AddExecutable.cmake )
#========================================================================
-#========================================================================
-INCLUDE( ${CREA_CMAKE_DIR}/CREAMacro_AddWxExecutable.cmake )
-#========================================================================
-
#========================================================================
INCLUDE( ${CREA_CMAKE_DIR}/CREAMacro_PreventInSourceBuild.cmake )
#========================================================================