[CMake] Suppressing Windows console in Qt app

clinton at elemtech.com clinton at elemtech.com
Mon Mar 24 10:59:37 EDT 2008


> If you are going to be building this as a cross platform application,
> then the following is useful:
>
>
> # Set some Win32 Specific Settings
> IF(WIN32)
> SET(GUI_TYPE WIN32)
> ENDIF(WIN32)
> # Set some Apple MacOS Specific settings
> IF (APPLE)
> SET(GUI_TYPE MACOSX_BUNDLE)
> ENDIF (APPLE)
>
> ADD_EXECUTABLE( MyApplication ${GUI_TYPE} ${PROJECT_SRCS} )

I usually do that a simpler way.
ADD_EXECUTABLE( MyApplication WIN32 MACOSX_BUNDLE ${PROJECT_SRCS} )
It doesn't break a Linux build to have WIN32 there.

Clint


More information about the CMake mailing list