# HG changeset patch # User koda # Date 1353663795 -3600 # Node ID 09c38cdf380d1a70359a4b653304ab1e06cfd363 # Parent 6d1570061d1907d65245b6f0026bdf30ca577b05 show console on win when debugging to see frontend messages diff -r 6d1570061d19 -r 09c38cdf380d CMakeLists.txt --- a/CMakeLists.txt Thu Nov 22 23:20:56 2012 +0400 +++ b/CMakeLists.txt Fri Nov 23 10:43:15 2012 +0100 @@ -1,8 +1,7 @@ project(hedgewars) #initialise cmake environment -cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) -cmake_policy(VERSION 2.6) +cmake_minimum_required(VERSION 2.6.0) FOREACH(hwpolicy CMP0003 CMP0012 CMP0017) IF(POLICY ${hwpolicy}) CMAKE_POLICY(SET ${hwpolicy} NEW) @@ -11,9 +10,11 @@ #use available modules, fallback to ours if not present (CMP0017 helps) set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules") -#set some default values -option(NOREVISION "Build Hedgewars without revision information" OFF) +#usually this is set at release time +option(NOREVISION "Build Hedgewars without revision information [default: off]" OFF) + +#set other default values option(NOSERVER "Disable gameServer build [default: auto]" OFF) option(NOPNG "Disable screenshoot compression [default: auto]" OFF) option(NOVIDEOREC "Disable video recording [default: auto]" OFF) @@ -24,6 +25,7 @@ option(CROSSAPPLE "Enable OSX when not on OSX [default: off]" OFF) option(MINIMAL_FLAGS "Respect system flags as much as possible [default: off]" OFF) + #detect Mercurial revision (if present) IF(NOT NOREVISION) set(default_build_type "DEBUG") @@ -71,7 +73,6 @@ set(CMAKE_INSTALL_PREFIX ${bundle_name}/Contents/MacOS/) set(DATA_INSTALL_DIR "../Resources/") set(target_dir ".") - set(minimum_macosx_version "10.6") else() set(target_dir "bin") endif() diff -r 6d1570061d19 -r 09c38cdf380d QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Thu Nov 22 23:20:56 2012 +0400 +++ b/QTfrontend/CMakeLists.txt Fri Nov 23 10:43:15 2012 +0100 @@ -163,8 +163,13 @@ link_directories(${EXECUTABLE_OUTPUT_PATH}) endif() +#when debugging, always prompt a console to see fronted messages +#TODO: check it doesn't interfere on UNIX +if(CMAKE_BUILD_TYPE MATCHES "RELEASE") + set(console_access "WIN32") +endif(CMAKE_BUILD_TYPE MATCHES "RELEASE") -add_executable(hedgewars WIN32 +add_executable(hedgewars ${console_access} ${hwfr_src} ${hwfr_moc_srcs} ${hwfr_hdrs}