diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-30 03:26:23 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-30 03:26:23 +0200 |
commit | e45b444242104e557f1bce14e9c11e3792bbe41f (patch) | |
tree | f35f8db020bcd0b9a20b4db0575e93369e5176f1 | |
parent | 8b0f8b9e597eb50ff9323037fd5fa1b9e330c467 (diff) | |
download | MultiMC-e45b444242104e557f1bce14e9c11e3792bbe41f.tar MultiMC-e45b444242104e557f1bce14e9c11e3792bbe41f.tar.gz MultiMC-e45b444242104e557f1bce14e9c11e3792bbe41f.tar.lz MultiMC-e45b444242104e557f1bce14e9c11e3792bbe41f.tar.xz MultiMC-e45b444242104e557f1bce14e9c11e3792bbe41f.zip |
Add tweaks to make things build on windows
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | depends/pack200/CMakeLists.txt | 8 | ||||
-rw-r--r-- | depends/pack200/src/zip.cpp | 5 | ||||
-rw-r--r-- | depends/quazip/CMakeLists.txt | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a3afe5d5..73b64f9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -357,8 +357,8 @@ ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32 ${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_QRC} ${MULTIMC_RCS}) # Link -QT5_USE_MODULES(MultiMC Widgets Network Xml) -TARGET_LINK_LIBRARIES(MultiMC quazip xz-embedded unpack200 libUtil libSettings libGroupView ${MultiMC_LINK_ADDITIONAL_LIBS}) +TARGET_LINK_LIBRARIES(MultiMC xz-embedded unpack200 quazip libUtil libSettings libGroupView ${MultiMC_LINK_ADDITIONAL_LIBS}) +QT5_USE_MODULES(MultiMC Core Widgets Network Xml) ADD_DEPENDENCIES(MultiMC MultiMCLauncher) diff --git a/depends/pack200/CMakeLists.txt b/depends/pack200/CMakeLists.txt index 3e41d378..d71f6535 100644 --- a/depends/pack200/CMakeLists.txt +++ b/depends/pack200/CMakeLists.txt @@ -37,9 +37,13 @@ src/zip.cpp src/zip.h ) -SET(PACK200_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE) -include_directories(include) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +SET(PACK200_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE) +include_directories( + include + ${ZLIB_INCLUDE_DIRS} +) add_library(unpack200 STATIC ${PACK200_SRC}) IF(UNIX) diff --git a/depends/pack200/src/zip.cpp b/depends/pack200/src/zip.cpp index baea2ba7..32e8bd50 100644 --- a/depends/pack200/src/zip.cpp +++ b/depends/pack200/src/zip.cpp @@ -48,7 +48,7 @@ #include "zip.h" -#include <zlib.h> +#include "zlib.h" inline uint32_t jar::get_crc32(uint32_t c, uchar *ptr, uint32_t len) { @@ -324,12 +324,13 @@ inline uint32_t jar::dostime(int y, int n, int d, int h, int m, int s) : (((uint32_t)y - 1980) << 25) | ((uint32_t)n << 21) | ((uint32_t)d << 16) | ((uint32_t)h << 11) | ((uint32_t)m << 5) | ((uint32_t)s >> 1); } - +/* #ifdef _REENTRANT // solaris extern "C" struct tm *gmtime_r(const time_t *, struct tm *); #else #define gmtime_r(t, s) gmtime(t) #endif +*/ /* * Return the Unix time in DOS format */ diff --git a/depends/quazip/CMakeLists.txt b/depends/quazip/CMakeLists.txt index 48fdb6be..76da0a59 100644 --- a/depends/quazip/CMakeLists.txt +++ b/depends/quazip/CMakeLists.txt @@ -32,7 +32,7 @@ ADD_DEFINITIONS(-DQUAZIP_STATIC) #qt5_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS}) #set(SRCS ${SRCS} ${MOC_SRCS}) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +#set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_library(quazip STATIC ${SRCS}) QT5_USE_MODULES(quazip Core) |