From 8a25bac7d376b8edb9aecb856527761666c1f3bb Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Sep 2010 19:51:20 +0200 Subject: [PATCH] Fixed: ryzom_client_patcher compilation --- code/CMakeLists.txt | 3 +-- code/CMakeModules/nel.cmake | 3 +-- code/nel/CMakeLists.txt | 7 ++----- code/ryzom/CMakeLists.txt | 10 +++++++++ code/ryzom/client/src/CMakeLists.txt | 12 ++++------- .../client/client_patcher/CMakeLists.txt | 21 ++++++++----------- 6 files changed, 27 insertions(+), 29 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 40411714a..e11a4efc3 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -34,6 +34,7 @@ IF(COMMAND cmake_policy) ENDIF(COMMAND cmake_policy) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/nel.cmake) +INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/ConfigureChecks.cmake) INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL) # Force out of source builds. @@ -112,8 +113,6 @@ ENDIF(FINAL_VERSION) IF(WITH_QT) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED) ENDIF(WITH_QT) -ADD_DEFINITIONS(-DHAVE_CONFIG_H) - IF(WITH_NEL) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index bab58b5bf..eab856e20 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -49,7 +49,6 @@ MACRO(NL_DEFAULT_PROPS name label) ENDIF(${type} STREQUAL SHARED_LIBRARY) ENDMACRO(NL_DEFAULT_PROPS) - ### # Adds the target suffix on Windows. # Argument: name - the library's target name. @@ -212,7 +211,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) OPTION(WITH_NEL_MAXPLUGIN "Build NeL 3dsMax Plugin" OFF) OPTION(WITH_NEL_SAMPLES "Build NeL Samples" ON ) OPTION(WITH_NEL_TESTS "Build NeL Unit Tests" ON ) - OPTION(WITH_MFC "With MFC Support" ON ) + OPTION(WITH_MFC "With MFC Support" ON ) ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS) diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index b8413ccac..8bc83bfb6 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -98,12 +98,9 @@ IF(WIN32) SET(WINSOCK2_LIB ws2_32.lib) ENDIF(WIN32) -ADD_SUBDIRECTORY(include) -# config.h configuration and use by projects -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) -ADD_DEFINITIONS(-DHAVE_CONFIG_H) +NL_CONFIGURE_CHECKS() +ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(src) IF(WITH_NEL_SAMPLES) diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index dd6355c2d..adca6a42d 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -20,6 +20,16 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/common ) NL_CONFIGURE_CHECKS() +IF(WITH_STATIC) + SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) + SET(CURL_DEFINITIONS -DCURL_STATICLIB) + SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC) +ENDIF(WITH_STATIC) + +IF(NOT WIN32) + SET(EXPAT_LIBRARY expat) +ENDIF(NOT WIN32) + ADD_SUBDIRECTORY(common) IF(WITH_RYZOM_CLIENT) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 8bfc9e424..7d4055570 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -65,7 +65,7 @@ INCLUDE_DIRECTORIES( ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}) +) TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} nelmisc @@ -78,23 +78,19 @@ TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} ryzom_clientsheets ryzom_gameshare nelpacs + ${LIBXML2_LIBRARIES} ${LUA_LIBRARIES} ${LUABIND_LIBRARY} ${CURL_LIBRARIES} - ${OPENSSL_LIBRARIES} ${LIBWWW_LIBRARIES} ${SEVENZIP_LIBRARY} - expat) # TODO: find expat cleanly using a find script + ${EXPAT_LIBRARY}) # TODO: find expat cleanly using a find script IF(NOT APPLE AND NOT WIN32) TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES}) ENDIF(NOT APPLE AND NOT WIN32) -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) - -IF(WITH_STATIC) - ADD_DEFINITIONS(-DCURL_STATICLIB -DLIBXML_STATIC) -ENDIF(WITH_STATIC) +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS}) NL_DEFAULT_PROPS(ryzom_client "Ryzom, Client: Ryzom Core Client") NL_ADD_RUNTIME_FLAGS(ryzom_client) diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index 15f9223b7..2c6f05a54 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -1,18 +1,15 @@ -FILE(GLOB SRC *.cpp *.h - ${CMAKE_SOURCE_DIR}/client/src/client_cfg.cpp - ${CMAKE_SOURCE_DIR}/client/src/login_patch.cpp - ${CMAKE_SOURCE_DIR}/client/src/login_xdelta.cpp +FILE(GLOB SRC main.cpp + ${CMAKE_SOURCE_DIR}/ryzom/client/src/client_cfg.cpp + ${CMAKE_SOURCE_DIR}/ryzom/client/src/login_patch.cpp + ${CMAKE_SOURCE_DIR}/ryzom/client/src/login_xdelta.cpp + ${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.cpp + ${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.h ) -SET(SEVENZIP_LIBRARY "ryzom_sevenzip") - ADD_EXECUTABLE(ryzom_client_patcher ${SRC}) INCLUDE_DIRECTORIES( - ${CMAKE_BINARY_DIR} - ${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/client/src ) @@ -20,10 +17,10 @@ TARGET_LINK_LIBRARIES(ryzom_client_patcher ${PLATFORM_LINKFLAGS} nelmisc nelnet ryzom_gameshare - ${CURL_LIBRARIES} - ${SEVENZIP_LIBRARY}) + ryzom_sevenzip + ${CURL_LIBRARIES}) -ADD_DEFINITIONS(-DRZ_NO_CLIENT -DNL_USE_SEVENZIP) +ADD_DEFINITIONS(${CURL_DEFINITIONS} -DRZ_NO_CLIENT -DNL_USE_SEVENZIP) NL_DEFAULT_PROPS(ryzom_client_patcher "Ryzom, Tools: Ryzom Client Patcher") NL_ADD_RUNTIME_FLAGS(ryzom_client_patcher)