diff options
Diffstat (limited to 'dep')
| -rw-r--r-- | dep/StormLib/CMakeLists.txt | 20 | ||||
| -rw-r--r-- | dep/StormLib/searchFix.patch | 49 |
2 files changed, 1 insertions, 68 deletions
diff --git a/dep/StormLib/CMakeLists.txt b/dep/StormLib/CMakeLists.txt index c7595b9c8be..a6735e0a6a0 100644 --- a/dep/StormLib/CMakeLists.txt +++ b/dep/StormLib/CMakeLists.txt @@ -1,6 +1,3 @@ -project(StormLib) -cmake_minimum_required(VERSION 2.6) - set(SRC_FILES src/adpcm/adpcm.cpp src/huffman/huff.cpp @@ -241,23 +238,18 @@ add_definitions(-D_7ZIP_ST -DBZ_STRICT_ANSI) if(WIN32) if(MSVC) - message(STATUS "Using MSVC") add_definitions(-D_7ZIP_ST -DWIN32) - else() - message(STATUS "Using mingw") endif() set(SRC_ADDITIONAL_FILES ${ZLIB_BZIP2_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES}) set(LINK_LIBS wininet) endif() if(APPLE) - message(STATUS "Using Mac OS X port") set(LINK_LIBS z bz2) set(SRC_ADDITIONAL_FILES ${TOMCRYPT_FILES} ${TOMMATH_FILES}) endif() if (${CMAKE_SYSTEM_NAME} STREQUAL Linux) - message(STATUS "Using Linux port") option(WITH_LIBTOMCRYPT "Use system LibTomCrypt library" OFF) if(WITH_LIBTOMCRYPT) set(LINK_LIBS z bz2 tomcrypt) @@ -267,15 +259,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL Linux) endif() endif() -add_library(storm SHARED ${SRC_FILES} ${SRC_ADDITIONAL_FILES}) +add_library(storm STATIC ${SRC_FILES} ${SRC_ADDITIONAL_FILES}) target_link_libraries(storm ${LINK_LIBS}) -option(WITH_TEST "Compile Test application" OFF) -if(WITH_TEST) - add_executable(storm_test ${TEST_SRC_FILES}) - target_link_libraries(storm_test storm) -endif() - if(APPLE) set_target_properties(storm PROPERTIES FRAMEWORK true) set_target_properties(storm PROPERTIES PUBLIC_HEADER "src/StormLib.h src/StormPort.h") @@ -290,7 +276,3 @@ endif() if(WIN32) set_target_properties(storm PROPERTIES OUTPUT_NAME StormLib) endif() - -install(TARGETS storm RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib FRAMEWORK DESTINATION /Library/Frameworks) -install(FILES src/StormLib.h src/StormPort.h DESTINATION include) - diff --git a/dep/StormLib/searchFix.patch b/dep/StormLib/searchFix.patch deleted file mode 100644 index d4ba11d8645..00000000000 --- a/dep/StormLib/searchFix.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/dep/StormLib/src/SFileFindFile.cpp b/dep/StormLib/src/SFileFindFile.cpp -index aa065d2..542637b 100644 ---- a/dep/StormLib/src/SFileFindFile.cpp -+++ b/dep/StormLib/src/SFileFindFile.cpp -@@ -31,7 +31,7 @@ struct TMPQSearch - DWORD dwSearchTableItems; // Number of items in the search table - DWORD dwNextIndex; // Next file index to be checked - DWORD dwFlagMask; // For checking flag mask -- char szSearchMask[1]; // Search mask (variable length) -+ char * szSearchMask; // Search mask (variable length) - }; - - //----------------------------------------------------------------------------- -@@ -69,7 +69,7 @@ bool CheckWildCard(const char * szString, const char * szWildCard) - szString++; - } - -- // If there is '*', means zero or more chars. We have to -+ // If there is '*', means zero or more chars. We have to - // find the sequence after '*' - if(*szWildCard == '*') - { -@@ -337,6 +337,8 @@ static void FreeMPQSearch(TMPQSearch *& hs) - { - if(hs->pSearchTable != NULL) - STORM_FREE(hs->pSearchTable); -+ if(hs->szSearchMask != NULL) -+ free(hs->szSearchMask); // allocated with strdup - STORM_FREE(hs); - hs = NULL; - } -@@ -376,7 +378,7 @@ HANDLE WINAPI SFileFindFirstFile(HANDLE hMpq, const char * szMask, SFILE_FIND_DA - if(nError == ERROR_SUCCESS) - { - memset(hs, 0, sizeof(TMPQSearch)); -- strcpy(hs->szSearchMask, szMask); -+ hs->szSearchMask = strdup(szMask); - hs->dwFlagMask = MPQ_FILE_EXISTS; - hs->ha = ha; - -@@ -406,7 +408,7 @@ HANDLE WINAPI SFileFindFirstFile(HANDLE hMpq, const char * szMask, SFILE_FIND_DA - FreeMPQSearch(hs); - SetLastError(nError); - } -- -+ - // Return the result value - return (HANDLE)hs; - } |
