make reading stdout possible on Windows
This commit is contained in:
parent
e35a2e4c79
commit
f3ad9f84de
|
@ -5,6 +5,7 @@ PROJECT(otclient)
|
||||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
|
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
|
||||||
|
|
||||||
OPTION(USE_PCH "Use precompiled header" ON)
|
OPTION(USE_PCH "Use precompiled header" ON)
|
||||||
|
OPTION(NO_CONSOLE "Disable console window on Windows" OFF)
|
||||||
|
|
||||||
# find needed packages
|
# find needed packages
|
||||||
SET(Boost_USE_STATIC_LIBS ON)
|
SET(Boost_USE_STATIC_LIBS ON)
|
||||||
|
@ -19,7 +20,7 @@ FIND_PACKAGE(PCHSupport REQUIRED)
|
||||||
|
|
||||||
# choose a default build type if not specified
|
# choose a default build type if not specified
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
SET(CMAKE_BUILD_TYPE Debug)
|
SET(CMAKE_BUILD_TYPE ReleaseWithDebInfo)
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
MESSAGE(STATUS "BUILD TYPE: " ${CMAKE_BUILD_TYPE})
|
MESSAGE(STATUS "BUILD TYPE: " ${CMAKE_BUILD_TYPE})
|
||||||
|
|
||||||
|
@ -138,11 +139,17 @@ SET(SOURCES
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(SOURCES ${SOURCES} src/framework/platform/win32platform.cpp)
|
SET(SOURCES ${SOURCES} src/framework/platform/win32platform.cpp)
|
||||||
SET(ADDITIONAL_LIBRARIES ws2_32)
|
SET(ADDITIONAL_LIBRARIES ws2_32)
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -mwindows")
|
|
||||||
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
|
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
IF(NO_CONSOLE)
|
||||||
ADD_DEFINITIONS(-DWIN32_NO_CONSOLE)
|
ADD_DEFINITIONS(-DWIN32_NO_CONSOLE)
|
||||||
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -mwindows")
|
||||||
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
ENDIF(NO_CONSOLE)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
SET(ADDITIONAL_LIBRARIES -lpthread)
|
SET(ADDITIONAL_LIBRARIES -lpthread)
|
||||||
SET(SOURCES ${SOURCES} src/framework/platform/x11platform.cpp)
|
SET(SOURCES ${SOURCES} src/framework/platform/x11platform.cpp)
|
||||||
|
|
Loading…
Reference in New Issue