add option to disable the console on windows

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15916 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2006-11-14 10:06:07 +00:00
parent debbb01da1
commit b0b3338abd
2 changed files with 16 additions and 2 deletions

View File

@ -67,9 +67,22 @@ if(ASPELL_FOUND)
else(ASPELL_FOUND)
message("----- No aspell, to get more information use -Daspell=1")
endif(ASPELL_FOUND)
message("")
set(all)
if(WIN32)
if(noconsole)
set(noconsole TRUE CACHE TYPE STRING)
set(WIN32_CONSOLE WIN32)
set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
message("----- Console disabled")
else(noconsole)
message("----- Console enabled, disable it with -Dnoconsole=1")
endif(noconsole)
endif(WIN32)
message("")
# create config.h
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
@ -90,7 +103,7 @@ if(MSVC)
else(MSVC)
add_definitions(-DBOOST_USER_CONFIG="<config.h>")
endif(MSVC)
if(MSVC AND NOT disable-pch)
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
configure_file(${CMAKE_SOURCE_DIR}/config.C.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_pch.C)

View File

@ -40,6 +40,7 @@ lyx_add_msvc_pch(lyx)
set(lyx_sources ${lyx_sources} ${CMAKE_CURRENT_BINARY_DIR}/version.C)
add_executable(lyx-${qt_postfix}
${WIN32_CONSOLE}
${lyx_sources}
${lyx_headers}
)