From 8948fa73c9bb8749d5da057931abcb86d748c1cf Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 11 Sep 2010 19:42:39 +0200 Subject: [PATCH] Changed: Winsock definition in root CMakeLists.txt --- code/CMakeLists.txt | 5 +++++ code/nel/CMakeLists.txt | 5 ----- code/nelns/CMakeLists.txt | 5 ----- code/snowballs2/CMakeLists.txt | 5 ----- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 140c56436..f890bec51 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -96,6 +96,11 @@ FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(PNG REQUIRED) FIND_PACKAGE(Jpeg) +IF(WIN32) + INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) + SET(WINSOCK2_LIB ws2_32.lib) +ENDIF(WIN32) + IF(WITH_STATIC) # libxml2 could need winsock2 library SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} ${WINSOCK2_LIB} -DLIBXML_STATIC) diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index ecd986f83..254ceb33f 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -89,11 +89,6 @@ IF(UNIX) INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION bin) ENDIF(UNIX) -IF(WIN32) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) - SET(WINSOCK2_LIB ws2_32.lib) -ENDIF(WIN32) - IF(NOT WIN32) NL_CONFIGURE_CHECKS() ENDIF(NOT WIN32) diff --git a/code/nelns/CMakeLists.txt b/code/nelns/CMakeLists.txt index 05e24da73..398e28911 100644 --- a/code/nelns/CMakeLists.txt +++ b/code/nelns/CMakeLists.txt @@ -94,11 +94,6 @@ NL_SETUP_BUILD() FIND_PACKAGE(NeLMISC) FIND_PACKAGE(NeLNET) -IF(WIN32) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) - SET(WINSOCK2_LIB ws2_32.lib) -ENDIF(WIN32) - NL_SETUP_BUILD_FLAGS() SET(ETCDIR "${NL_ETC_PREFIX}/nelns") diff --git a/code/snowballs2/CMakeLists.txt b/code/snowballs2/CMakeLists.txt index f6f84d58b..8040f33ec 100644 --- a/code/snowballs2/CMakeLists.txt +++ b/code/snowballs2/CMakeLists.txt @@ -92,11 +92,6 @@ IF(BUILD_CLIENT) ENDIF(ENABLE_SOUND) ENDIF(BUILD_CLIENT) -IF(WIN32) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) - SET(WINSOCK2_LIB ws2_32.lib) -ENDIF(WIN32) - NL_SETUP_BUILD_FLAGS() ADD_DEFINITIONS(-DSNOWBALLS_CONFIG="${SNOWBALLS_CONFIG_FILE}/" -DSNOWBALLS_STATE="${SNOWBALLS_LOG_FILE}/" -DSNOWBALLS_LOGS="${SNOWBALLS_LOG_FILE}/")