From 20b4fc8a87558e05d383ee2a3de25f8e55230b70 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 24 Sep 2014 17:51:05 +0200 Subject: [PATCH] Move 7zip library --HG-- branch : feature-streamed-package --- code/CMakeLists.txt | 1 + code/nel/3rdparty/CMakeLists.txt | 2 ++ .../3rdparty}/seven_zip/7zAlloc.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zAlloc.h | 0 .../3rdparty}/seven_zip/7zBuffer.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zBuffer.h | 0 .../src => nel/3rdparty}/seven_zip/7zCrc.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zCrc.h | 0 .../3rdparty}/seven_zip/7zDecode.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zDecode.h | 0 .../3rdparty}/seven_zip/7zExtract.cpp | 0 .../3rdparty}/seven_zip/7zExtract.h | 0 .../3rdparty}/seven_zip/7zHeader.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zHeader.h | 0 .../src => nel/3rdparty}/seven_zip/7zIn.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zIn.h | 0 .../src => nel/3rdparty}/seven_zip/7zItem.cpp | 0 .../src => nel/3rdparty}/seven_zip/7zItem.h | 0 .../src => nel/3rdparty}/seven_zip/7zMain.cpp | 0 .../3rdparty}/seven_zip/7zMethodID.cpp | 0 .../3rdparty}/seven_zip/7zMethodID.h | 0 .../src => nel/3rdparty}/seven_zip/7zTypes.h | 0 .../3rdparty}/seven_zip/BranchTypes.h | 0 .../3rdparty}/seven_zip/BranchX86.cpp | 0 .../3rdparty}/seven_zip/BranchX86.h | 0 code/nel/3rdparty/seven_zip/CMakeLists.txt | 27 +++++++++++++++++++ .../3rdparty}/seven_zip/LzmaDecode.cpp | 0 .../3rdparty}/seven_zip/LzmaDecode.h | 0 .../3rdparty}/seven_zip/LzmaRamDecode.cpp | 0 .../3rdparty}/seven_zip/LzmaRamDecode.h | 0 .../3rdparty}/seven_zip/LzmaTypes.h | 0 .../src => nel/3rdparty}/seven_zip/readme.txt | 0 code/nel/CMakeLists.txt | 1 + code/nel/src/misc/CMakeLists.txt | 2 +- code/ryzom/client/src/CMakeLists.txt | 2 -- .../ryzom/client/src/seven_zip/CMakeLists.txt | 27 ------------------- .../client/client_patcher/CMakeLists.txt | 2 +- 37 files changed, 33 insertions(+), 31 deletions(-) create mode 100644 code/nel/3rdparty/CMakeLists.txt rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zAlloc.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zAlloc.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zBuffer.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zBuffer.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zCrc.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zCrc.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zDecode.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zDecode.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zExtract.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zExtract.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zHeader.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zHeader.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zIn.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zIn.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zItem.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zItem.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zMain.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zMethodID.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zMethodID.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/7zTypes.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/BranchTypes.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/BranchX86.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/BranchX86.h (100%) create mode 100644 code/nel/3rdparty/seven_zip/CMakeLists.txt rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaDecode.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaDecode.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaRamDecode.cpp (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaRamDecode.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/LzmaTypes.h (100%) rename code/{ryzom/client/src => nel/3rdparty}/seven_zip/readme.txt (100%) delete mode 100644 code/ryzom/client/src/seven_zip/CMakeLists.txt diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 071554e06..80bc52421 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -177,6 +177,7 @@ IF(WITH_NEL) ENDIF(WITH_GUI) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include ${LIBXML2_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/3rdparty) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_SUBDIRECTORY(nel) ENDIF(WITH_NEL) diff --git a/code/nel/3rdparty/CMakeLists.txt b/code/nel/3rdparty/CMakeLists.txt new file mode 100644 index 000000000..bdd3e5fcd --- /dev/null +++ b/code/nel/3rdparty/CMakeLists.txt @@ -0,0 +1,2 @@ +SET(SEVENZIP_LIBRARY "nel_sevenzip") +ADD_SUBDIRECTORY(seven_zip) diff --git a/code/ryzom/client/src/seven_zip/7zAlloc.cpp b/code/nel/3rdparty/seven_zip/7zAlloc.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zAlloc.cpp rename to code/nel/3rdparty/seven_zip/7zAlloc.cpp diff --git a/code/ryzom/client/src/seven_zip/7zAlloc.h b/code/nel/3rdparty/seven_zip/7zAlloc.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zAlloc.h rename to code/nel/3rdparty/seven_zip/7zAlloc.h diff --git a/code/ryzom/client/src/seven_zip/7zBuffer.cpp b/code/nel/3rdparty/seven_zip/7zBuffer.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zBuffer.cpp rename to code/nel/3rdparty/seven_zip/7zBuffer.cpp diff --git a/code/ryzom/client/src/seven_zip/7zBuffer.h b/code/nel/3rdparty/seven_zip/7zBuffer.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zBuffer.h rename to code/nel/3rdparty/seven_zip/7zBuffer.h diff --git a/code/ryzom/client/src/seven_zip/7zCrc.cpp b/code/nel/3rdparty/seven_zip/7zCrc.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zCrc.cpp rename to code/nel/3rdparty/seven_zip/7zCrc.cpp diff --git a/code/ryzom/client/src/seven_zip/7zCrc.h b/code/nel/3rdparty/seven_zip/7zCrc.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zCrc.h rename to code/nel/3rdparty/seven_zip/7zCrc.h diff --git a/code/ryzom/client/src/seven_zip/7zDecode.cpp b/code/nel/3rdparty/seven_zip/7zDecode.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zDecode.cpp rename to code/nel/3rdparty/seven_zip/7zDecode.cpp diff --git a/code/ryzom/client/src/seven_zip/7zDecode.h b/code/nel/3rdparty/seven_zip/7zDecode.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zDecode.h rename to code/nel/3rdparty/seven_zip/7zDecode.h diff --git a/code/ryzom/client/src/seven_zip/7zExtract.cpp b/code/nel/3rdparty/seven_zip/7zExtract.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zExtract.cpp rename to code/nel/3rdparty/seven_zip/7zExtract.cpp diff --git a/code/ryzom/client/src/seven_zip/7zExtract.h b/code/nel/3rdparty/seven_zip/7zExtract.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zExtract.h rename to code/nel/3rdparty/seven_zip/7zExtract.h diff --git a/code/ryzom/client/src/seven_zip/7zHeader.cpp b/code/nel/3rdparty/seven_zip/7zHeader.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zHeader.cpp rename to code/nel/3rdparty/seven_zip/7zHeader.cpp diff --git a/code/ryzom/client/src/seven_zip/7zHeader.h b/code/nel/3rdparty/seven_zip/7zHeader.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zHeader.h rename to code/nel/3rdparty/seven_zip/7zHeader.h diff --git a/code/ryzom/client/src/seven_zip/7zIn.cpp b/code/nel/3rdparty/seven_zip/7zIn.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zIn.cpp rename to code/nel/3rdparty/seven_zip/7zIn.cpp diff --git a/code/ryzom/client/src/seven_zip/7zIn.h b/code/nel/3rdparty/seven_zip/7zIn.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zIn.h rename to code/nel/3rdparty/seven_zip/7zIn.h diff --git a/code/ryzom/client/src/seven_zip/7zItem.cpp b/code/nel/3rdparty/seven_zip/7zItem.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zItem.cpp rename to code/nel/3rdparty/seven_zip/7zItem.cpp diff --git a/code/ryzom/client/src/seven_zip/7zItem.h b/code/nel/3rdparty/seven_zip/7zItem.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zItem.h rename to code/nel/3rdparty/seven_zip/7zItem.h diff --git a/code/ryzom/client/src/seven_zip/7zMain.cpp b/code/nel/3rdparty/seven_zip/7zMain.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zMain.cpp rename to code/nel/3rdparty/seven_zip/7zMain.cpp diff --git a/code/ryzom/client/src/seven_zip/7zMethodID.cpp b/code/nel/3rdparty/seven_zip/7zMethodID.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/7zMethodID.cpp rename to code/nel/3rdparty/seven_zip/7zMethodID.cpp diff --git a/code/ryzom/client/src/seven_zip/7zMethodID.h b/code/nel/3rdparty/seven_zip/7zMethodID.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zMethodID.h rename to code/nel/3rdparty/seven_zip/7zMethodID.h diff --git a/code/ryzom/client/src/seven_zip/7zTypes.h b/code/nel/3rdparty/seven_zip/7zTypes.h similarity index 100% rename from code/ryzom/client/src/seven_zip/7zTypes.h rename to code/nel/3rdparty/seven_zip/7zTypes.h diff --git a/code/ryzom/client/src/seven_zip/BranchTypes.h b/code/nel/3rdparty/seven_zip/BranchTypes.h similarity index 100% rename from code/ryzom/client/src/seven_zip/BranchTypes.h rename to code/nel/3rdparty/seven_zip/BranchTypes.h diff --git a/code/ryzom/client/src/seven_zip/BranchX86.cpp b/code/nel/3rdparty/seven_zip/BranchX86.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/BranchX86.cpp rename to code/nel/3rdparty/seven_zip/BranchX86.cpp diff --git a/code/ryzom/client/src/seven_zip/BranchX86.h b/code/nel/3rdparty/seven_zip/BranchX86.h similarity index 100% rename from code/ryzom/client/src/seven_zip/BranchX86.h rename to code/nel/3rdparty/seven_zip/BranchX86.h diff --git a/code/nel/3rdparty/seven_zip/CMakeLists.txt b/code/nel/3rdparty/seven_zip/CMakeLists.txt new file mode 100644 index 000000000..d2d2e690d --- /dev/null +++ b/code/nel/3rdparty/seven_zip/CMakeLists.txt @@ -0,0 +1,27 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +FILE(GLOB LIB_SRC *.cpp *.h) + +LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) + +NL_TARGET_LIB(nel_sevenzip ${LIB_SRC}) +# TARGET_LINK_LIBRARIES(nel_sevenzip ${PLATFORM_LINKFLAGS}) +NL_DEFAULT_PROPS(nel_sevenzip "NeL, 3rd Party: Seven Zip") +NL_ADD_RUNTIME_FLAGS(nel_sevenzip) +NL_ADD_LIB_SUFFIX(nel_sevenzip) + +ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nel_sevenzip LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + +IF(WITH_TOOLS) + ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) + + TARGET_LINK_LIBRARIES(7zDec nel_sevenzip) + NL_DEFAULT_PROPS(7zDec "NeL, 3rd Party: Seven Zip Decoder") + NL_ADD_RUNTIME_FLAGS(7zDec) + + INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools) +ENDIF(WITH_TOOLS) diff --git a/code/ryzom/client/src/seven_zip/LzmaDecode.cpp b/code/nel/3rdparty/seven_zip/LzmaDecode.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaDecode.cpp rename to code/nel/3rdparty/seven_zip/LzmaDecode.cpp diff --git a/code/ryzom/client/src/seven_zip/LzmaDecode.h b/code/nel/3rdparty/seven_zip/LzmaDecode.h similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaDecode.h rename to code/nel/3rdparty/seven_zip/LzmaDecode.h diff --git a/code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp b/code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp rename to code/nel/3rdparty/seven_zip/LzmaRamDecode.cpp diff --git a/code/ryzom/client/src/seven_zip/LzmaRamDecode.h b/code/nel/3rdparty/seven_zip/LzmaRamDecode.h similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaRamDecode.h rename to code/nel/3rdparty/seven_zip/LzmaRamDecode.h diff --git a/code/ryzom/client/src/seven_zip/LzmaTypes.h b/code/nel/3rdparty/seven_zip/LzmaTypes.h similarity index 100% rename from code/ryzom/client/src/seven_zip/LzmaTypes.h rename to code/nel/3rdparty/seven_zip/LzmaTypes.h diff --git a/code/ryzom/client/src/seven_zip/readme.txt b/code/nel/3rdparty/seven_zip/readme.txt similarity index 100% rename from code/ryzom/client/src/seven_zip/readme.txt rename to code/nel/3rdparty/seven_zip/readme.txt diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index 53bf071e3..d3f0a3e5c 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -70,6 +70,7 @@ IF(WITH_INSTALL_LIBRARIES) ADD_SUBDIRECTORY(include) ENDIF(WITH_INSTALL_LIBRARIES) +ADD_SUBDIRECTORY(3rdparty) ADD_SUBDIRECTORY(src) IF(WITH_NEL_SAMPLES) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 2d3ef9066..8494c23a6 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -39,7 +39,7 @@ ENDIF(UNIX) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) -TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY}) +TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARY} nel_sevenzip) SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc") NL_ADD_RUNTIME_FLAGS(nelmisc) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index c20d9d0dc..3fbbfd0e2 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -5,9 +5,7 @@ ADD_SUBDIRECTORY(client_sheets) IF(WITH_RYZOM_CLIENT) # These are Windows/MFC apps -SET(SEVENZIP_LIBRARY "ryzom_sevenzip") -ADD_SUBDIRECTORY(seven_zip) IF(WITH_RYZOM_PATCH) ADD_DEFINITIONS(-DRZ_USE_PATCH) diff --git a/code/ryzom/client/src/seven_zip/CMakeLists.txt b/code/ryzom/client/src/seven_zip/CMakeLists.txt deleted file mode 100644 index cc152757b..000000000 --- a/code/ryzom/client/src/seven_zip/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) - -FILE(GLOB LIB_SRC *.cpp *.h) - -LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) - -NL_TARGET_LIB(ryzom_sevenzip ${LIB_SRC}) -# TARGET_LINK_LIBRARIES(ryzom_sevenzip ${PLATFORM_LINKFLAGS}) -NL_DEFAULT_PROPS(ryzom_sevenzip "Ryzom, Library: Seven Zip") -NL_ADD_RUNTIME_FLAGS(ryzom_sevenzip) -NL_ADD_LIB_SUFFIX(ryzom_sevenzip) - -ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) - -IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) - INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION ${RYZOM_LIB_PREFIX} ARCHIVE DESTINATION ${RYZOM_LIB_PREFIX} COMPONENT libraries) -ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) - -IF(WITH_RYZOM_TOOLS) - ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) - - TARGET_LINK_LIBRARIES(7zDec ryzom_sevenzip) - NL_DEFAULT_PROPS(7zDec "Ryzom, Tools, Misc: Seven Zip Decoder") - NL_ADD_RUNTIME_FLAGS(7zDec) - - INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) -ENDIF(WITH_RYZOM_TOOLS) diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index e5b845e43..69b14e5a1 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -19,7 +19,7 @@ TARGET_LINK_LIBRARIES(ryzom_client_patcher nelmisc nelnet ryzom_gameshare - ryzom_sevenzip + nel_sevenzip ${CURL_LIBRARIES}) IF(APPLE)