Commit 4c91a183 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add Alvin Wong's patches to build with mingw on Windows

(Instead of MXE on Linux)
parent 56139e33
......@@ -52,6 +52,10 @@ if (MSVC)
set(PATCH_COMMAND myptch)
endif()
if (MINGW)
set(PATCH_COMMAND myptch)
endif()
if (MSYS)
set(PATCH_COMMAND patch)
set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
......@@ -80,6 +84,10 @@ if (MSVC)
add_subdirectory( ext_patch )
add_subdirectory( ext_png2ico )
endif (MSVC)
if (MINGW)
add_subdirectory( ext_patch )
add_subdirectory( ext_png2ico )
endif (MINGW)
add_subdirectory( ext_iconv )
add_subdirectory( ext_gettext )
add_subdirectory( ext_zlib )
......
......@@ -22,6 +22,30 @@ if (MSVC)
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_boost}/lib/boost_system-vc140-mt-1_55.dll ${PREFIX_ext_boost}/bin/boost_system-vc140-mt-1_55.dll
DEPENDEES install
)
elseif(MINGW)
ExternalProject_Add(
ext_boost
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/boost_1_55_0.zip
URL_MD5 8aca361a4713a1f491b0a5e33fee0f1f
CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.bat mingw --prefix=${PREFIX_ext_boost}
BUILD_COMMAND <SOURCE_DIR>/b2.exe --with-system --build-dir=build-dir --prefix=${PREFIX_ext_boost} toolset=gcc variant=release link=shared threading=multi architecture=x86 variant=release install
INSTALL_COMMAND ""
INSTALL_DIR ${EXTPREFIX_boost}
UPDATE_COMMAND ""
ALWAYS 0
BUILD_IN_SOURCE 1
)
ExternalProject_Add_Step(
ext_boost
post_install
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_boost}/lib/libboost_system-mgw51-mt-1_55.dll ${PREFIX_ext_boost}/bin/
DEPENDEES install
)
else()
ExternalProject_Add(
ext_boost
......
......@@ -6,6 +6,7 @@ ExternalProject_Add( ext_exiv2
URL_MD5 258d4831b30f75a01e0234065c6c2806
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/tzname.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
INSTALL_DIR ${PREFIX_ext_exiv2}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DEXIV2_ENABLE_BUILD_SAMPLES=OFF -DEXIV2_ENABLE_BUILD_PO=OFF -DEXIV2_ENABLE_NLS=OFF -DICONV_INCLUDE_DIR=${PREFIX_ext_exiv2}/include
......
diff a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -291,6 +291,9 @@ IF (CYGWIN OR MINGW)
TARGET_LINK_LIBRARIES( exiv2lib psapi )
ENDIF(CYGWIN OR MINGW)
+IF (MINGW)
+ TARGET_LINK_LIBRARIES( exiv2lib ws2_32 )
+ENDIF(MINGW)
INSTALL( TARGETS exiv2lib ${INSTALL_TARGET_STANDARD_ARGS} )
diff a/src/http.cpp b/src/http.cpp
--- a/src/http.cpp
+++ b/src/http.cpp
@@ -53,7 +53,7 @@
#include <string.h>
#include <windows.h>
#include <io.h>
-#ifndef __MINGW__
+#if !defined(__MINGW__) && !defined(__MINGW32__) && !defined(__MINGW64__)
#define snprintf sprintf_s
#define write _write
#define read _read
SET(PREFIX_ext_expat "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_expat
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/expat-2.2.0.tar.bz2
......
......@@ -33,7 +33,23 @@ if (MSVC)
ALWAYS 0
)
endif()
else (MSVC)
elseif (MINGW)
ExternalProject_Add( ext_fftw3
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/fftw-3.3.4-dll64.zip
URL_MD5 c4ec1e6d84e7a8b1cd61121d11d44ee4
INSTALL_DIR ${PREFIX_ext_fftw3}
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo deploying fftw3 64 binary
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/bin ${PREFIX_ext_fftw3}/bin
COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/lib ${PREFIX_ext_fftw3}/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${PREFIX_ext_fftw3}/include
UPDATE_COMMAND ""
ALWAYS 0
)
else ()
ExternalProject_Add( ext_fftw3
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/fftw-3.3.4.tar.gz
......@@ -47,4 +63,4 @@ ExternalProject_Add( ext_fftw3
UPDATE_COMMAND ""
ALWAYS 0
)
endif (MSVC)
endif ()
SET(PREFIX_ext_gettext "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add(
ext_gettext
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
......@@ -14,7 +14,7 @@ ExternalProject_Add(
ALWAYS 0
DEPENDS ext_patch ext_iconv
)
else (MSVC)
else (MSVC OR MINGW)
ExternalProject_Add( ext_gettext
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/gettext-0.19.8.tar.gz
......@@ -29,4 +29,4 @@ ExternalProject_Add( ext_gettext
ALWAYS 0
DEPENDS ext_iconv
)
endif (MSVC)
endif (MSVC OR MINGW)
......@@ -2,7 +2,7 @@
# From https://github.com/ampl/gsl. which adds CMake support to gsl
#
SET(EXTPREFIX_gsl "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add(
ext_gsl
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
......
SET(PREFIX_ext_iconv "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_iconv
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/win-iconv-0.0.6.tar.bz2
......
......@@ -22,3 +22,16 @@ if (MSVC)
DEPENDEES install
)
endif()
if (MINGW)
ExternalProject_Add_Step(
ext_ilmbase
post_install
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libHalf.dll ${PREFIX_ext_ilmbase}/bin/libHalf.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libIex.dll ${PREFIX_ext_ilmbase}/bin/libIex.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libImath.dll ${PREFIX_ext_ilmbase}/bin/libImath.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libIlmThread.dll ${PREFIX_ext_ilmbase}/bin/libIlmThread.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_ilmbase}/lib/libIexMath.dll ${PREFIX_ext_ilmbase}/bin/libIexMath.dll
DEPENDEES install
)
endif()
SET(PREFIX_ext_jpeg "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_jpeg
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libjpeg-turbo-1.5.0.tar.gz
......
SET(PREFIX_ext_lcms2 "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_lcms2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/lcms2-2.8rc1.tar.gz
......@@ -13,7 +13,7 @@ ExternalProject_Add( ext_lcms2
ALWAYS 0
DEPENDS ext_patch
)
else (MSVC)
else (MSVC OR MINGW)
ExternalProject_Add( ext_lcms2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/lcms2-2.8rc1.tar.gz
......@@ -26,4 +26,4 @@ ExternalProject_Add( ext_lcms2
UPDATE_COMMAND ""
ALWAYS 0
)
endif (MSVC)
endif (MSVC OR MINGW)
SET(PREFIX_ext_libxml2 "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_libxml2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxml2-sources-2.9.3.tar.gz
......@@ -13,7 +13,7 @@ if (MSVC)
ALWAYS 0
DEPENDS ext_patch ext_iconv ext_zlib
)
else (MSVC)
else (MSVC OR MINGW)
ExternalProject_Add( ext_libxml2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxml2-sources-2.9.3.tar.gz
......@@ -28,4 +28,4 @@ else (MSVC)
ALWAYS 0
DEPENDS ext_iconv ext_zlib
)
endif (MSVC)
endif (MSVC OR MINGW)
SET(PREFIX_ext_libxslt "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_libxslt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxslt-1.1.29.tar.gz
......@@ -13,7 +13,7 @@ ExternalProject_Add( ext_libxslt
ALWAYS 0
DEPENDS ext_patch ext_libxml2
)
else (MSVC)
else (MSVC OR MINGW)
ExternalProject_Add( ext_libxslt
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/libxslt-1.1.29.tar.gz
......@@ -27,4 +27,4 @@ ExternalProject_Add( ext_libxslt
ALWAYS 0
DEPENDS ext_libxml2
)
endif (MSVC)
endif (MSVC OR MINGW)
......@@ -4,7 +4,7 @@
# ocio on Windows.
#
SET(EXTPREFIX_ocio "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add(
ext_ocio
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
......@@ -12,6 +12,7 @@ ExternalProject_Add(
URL_MD5 7065faa41103ed27f5ea9b01b9e14c91
INSTALL_DIR ${EXTPREFIX_ocio}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC_JNIGLUE=OFF
UPDATE_COMMAND ""
......
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13e2d64..47b5297 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -171,7 +171,7 @@ else(USE_EXTERNAL_TINYXML)
INSTALL_DIR ext/dist
CMAKE_ARGS ${TINYXML_CMAKE_ARGS}
)
- if(WIN32)
+ if(MSVC)
set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib)
else()
set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libtinyxml.a)
@@ -211,7 +211,7 @@ else(USE_EXTERNAL_YAML)
)
set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include)
set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)
- if(WIN32)
+ if(MSVC)
set(YAML_CPP_STATIC_DEBUG_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmdd.lib)
set(YAML_CPP_STATIC_OPTIMIZED_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmd.lib)
else()
@@ -271,7 +271,7 @@ endif()
messageonce("SSE Optimizations: ${OCIO_USE_SSE}")
if(OCIO_USE_SSE)
- if(WIN32)
+ if(MSVC)
# SSE instructions are automatically compiled into 64-bit applications so enabling the option is redundant and
# actually produces an unknown option warning in Visual Studio.
if(NOT CMAKE_CL_64)
diff --git a/src/core/Platform.h b/src/core/Platform.h
index d2d3f30..e3afa19 100644
--- a/src/core/Platform.h
+++ b/src/core/Platform.h
@@ -75,7 +75,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#define NOMINMAX 1
// windows - defined for both Win32 and Win64
-#include <Windows.h>
+#include <windows.h>
#include <malloc.h>
#include <io.h>
#include <tchar.h>
\ No newline at end of file
......@@ -5,6 +5,7 @@ ExternalProject_Add( ext_openexr
URL_MD5 b64e931c82aa3790329c21418373db4e
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/openexr.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
INSTALL_DIR ${PREFIX_ext_openexr}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_openexr} -DILMBASE_PACKAGE_PREFIX=${PREFIX_ext_openexr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DNAMESPACE_VERSIONING=OFF
......
--- a/IlmImf/ImfSystemSpecific.h
+++ b/IlmImf/ImfSystemSpecific.h
@@ -54,7 +54,7 @@
#ifdef IMF_HAVE_SSE2
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__MINGW__) && !defined(__MINGW32__) && !defined(__MINGW64__)
// Causes issues on certain gcc versions
//#define EXR_FORCEINLINE inline __attribute__((always_inline))
#define EXR_FORCEINLINE inline
@@ -73,7 +73,7 @@
free(ptr);
}
-#elif defined _MSC_VER
+#elif defined(_MSC_VER) || defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#define EXR_FORCEINLINE __forceinline
#define EXR_RESTRICT __restrict
--- a/IlmImf/ImfOptimizedPixelReading.h
+++ b/IlmImf/ImfOptimizedPixelReading.h
@@ -70,7 +70,7 @@
bool
isPointerSSEAligned (const void* EXR_RESTRICT pPointer)
{
- unsigned long trailingBits = ((unsigned long)pPointer) & 15;
+ unsigned long trailingBits = ((unsigned size_t)pPointer) & 15;
return trailingBits == 0;
}
SET(EXTPREFIX_tiff "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add( ext_tiff
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/tiff-4.0.3.tar.gz
......@@ -13,7 +13,7 @@ ExternalProject_Add( ext_tiff
ALWAYS 0
DEPENDS ext_patch ext_zlib ext_jpeg
)
else (MSVC)
else (MSVC OR MINGW)
ExternalProject_Add( ext_tiff
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/tiff-4.0.6.tar.gz
......@@ -27,4 +27,4 @@ ExternalProject_Add( ext_tiff
ALWAYS 0
DEPENDS ext_zlib ext_jpeg
)
endif (MSVC)
endif (MSVC OR MINGW)
......@@ -54,7 +54,7 @@ new file mode 100644
index 0000000..ee25058
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,181 @@
@@ -0,0 +1,199 @@
+# configure checks.
+find_package(OpenGL)
+
......@@ -157,6 +157,7 @@ index 0000000..ee25058
+check_symbol_exists("int8" "stdint.h" HAVE_INT8)
+check_symbol_exists("int16" "stdint.h" HAVE_INT16)
+check_symbol_exists("int32" "stdint.h" HAVE_INT32)
+check_symbol_exists("int64" "stdint.h" HAVE_INT64)
+
+
+set(PACKAGE "tiff")
......@@ -196,12 +197,29 @@ index 0000000..ee25058
+ set(STRIP_SIZE_DEFAULT 8192)
+endif(STRIPCHOP_DEFAULT AND NOT WIN32)
+
+if(WIN32)
+if(MSVC)
+ set(TIFF_INT8_T "signed char")
+ set(TIFF_UINT8_T "unsigned char")
+ set(TIFF_INT16_T "signed short")
+ set(TIFF_UINT16_T "unsigned short")
+ set(TIFF_INT32_T "signed int")
+ set(TIFF_UINT32_T "unsigned int")
+ set(TIFF_INT64_FORMAT "\"%I64d\"")
+ set(TIFF_INT64_T "signed __int64")
+ set(TIFF_UINT64_FORMAT "\"%I64u\"")
+ set(TIFF_UINT64_T "unsigned __int64")
+endif(WIN32)
+elseif(MINGW)
+ set(TIFF_INT8_T "signed char")
+ set(TIFF_UINT8_T "unsigned char")
+ set(TIFF_INT16_T "signed short")
+ set(TIFF_UINT16_T "unsigned short")
+ set(TIFF_INT32_T "signed int")
+ set(TIFF_UINT32_T "unsigned int")
+ set(TIFF_INT64_FORMAT "\"%lld\"")
+ set(TIFF_INT64_T "signed long long")
+ set(TIFF_UINT64_FORMAT "\"%llu\"")
+ set(TIFF_UINT64_T "unsigned long long")
+endif()
+
+check_symbol_exists("tm" "sys/time.h" TM_IN_SYS_TIME)
+
......@@ -231,10 +249,10 @@ index 0000000..ee25058
+#cmakedefine _LARGE_FILES
+#***************************************************************************************
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tif_config.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h @COPYONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tiffconf.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h @COPYONLY)
+#configure_file(${CMAKE_SOURCE_DIR}/libtiff/tif_config.h.cmake ${CMAKE_BINARY_DIR}/tif_config.h)
+#configure_file(${CMAKE_SOURCE_DIR}/libtiff/tiffconf.h.cmake ${CMAKE_BINARY_DIR}/tiffconf.h)
+#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tif_config.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h @COPYONLY)
+#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff/tiffconf.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h @COPYONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libtiff/tif_config.h.cmake ${CMAKE_BINARY_DIR}/tif_config.h)
+configure_file(${CMAKE_SOURCE_DIR}/libtiff/tiffconf.h.cmake ${CMAKE_BINARY_DIR}/tiffconf.h)
+
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
new file mode 100644
......@@ -311,7 +329,7 @@ new file mode 100644
index 0000000..d3e8f98
--- /dev/null
+++ b/libtiff/tif_config.h.cmake
@@ -0,0 +1,320 @@
@@ -0,0 +1,323 @@
+/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */
+#ifndef TIF_CONFIG_H
+#define TIF_CONFIG_H
......@@ -362,6 +380,9 @@ index 0000000..d3e8f98
+/* Define to 1 if the system has the type `int32'. */
+#cmakedefine HAVE_INT32
+
+/* Define to 1 if the system has the type `int64'. */
+#cmakedefine HAVE_INT64
+
+/* Define to 1 if the system has the type `int8'. */
+#cmakedefine HAVE_INT8
+
......@@ -659,42 +680,12 @@ index 2cf1de9..e07ca59 100644
#endif
static void
diff --git a/libtiff/tiff.h b/libtiff/tiff.h
index 19b4e79..718f9e9 100644
--- a/libtiff/tiff.h
+++ b/libtiff/tiff.h
@@ -65,17 +65,17 @@
* strings unsigned char*
*/
-typedef TIFF_INT8_T int8;
-typedef TIFF_UINT8_T uint8;
+typedef __int8 int8;
+typedef unsigned __int8 uint8;
-typedef TIFF_INT16_T int16;
-typedef TIFF_UINT16_T uint16;
+typedef __int16 int16;
+typedef unsigned __int16 uint16;
-typedef TIFF_INT32_T int32;
-typedef TIFF_UINT32_T uint32;
+typedef __int32 int32;
+typedef unsigned __int32 uint32;
-typedef TIFF_INT64_T int64;
-typedef TIFF_UINT64_T uint64;
+typedef __int64 int64;
+typedef unsigned __int64 uint64;
/*
* Some types as promoted in a variable argument list
diff --git a/libtiff/tiffconf.h.cmake b/libtiff/tiffconf.h.cmake
new file mode 100644
index 0000000..aef040b
--- /dev/null
+++ b/libtiff/tiffconf.h.cmake
@@ -0,0 +1,103 @@
@@ -0,0 +1,150 @@
+/*
+ Configuration defines for installed libtiff.
+ This file maintained for backward compatibility. Do not use definitions
......@@ -710,9 +701,56 @@ index 0000000..aef040b
+/* Define to 1 if the system has the type `int32'. */
+#cmakedefine HAVE_INT32
+
+/* Define to 1 if the system has the type `int64'. */
+#cmakedefine HAVE_INT64
+
+/* Define to 1 if the system has the type `int8'. */
+#cmakedefine HAVE_INT8
+
+/* Signed 8-bit type */
+#cmakedefine TIFF_INT8_T @TIFF_INT8_T@
+
+/* Unsigned 8-bit type */
+#cmakedefine TIFF_UINT8_T @TIFF_UINT8_T@
+
+/* Signed 16-bit type */
+#cmakedefine TIFF_INT16_T @TIFF_INT16_T@
+
+/* Unsigned 16-bit type */
+#cmakedefine TIFF_UINT16_T @TIFF_UINT16_T@
+
+/* Signed 32-bit type */
+#cmakedefine TIFF_INT32_T @TIFF_INT32_T@
+
+/* Unsigned 32-bit type */
+#cmakedefine TIFF_UINT32_T @TIFF_UINT32_T@
+
+/* Signed 64-bit type formatter */
+#cmakedefine TIFF_INT64_FORMAT @TIFF_INT64_FORMAT@
+
+/* Signed 64-bit type */
+#cmakedefine TIFF_INT64_T @TIFF_INT64_T@
+
+/* Unsigned 64-bit type formatter */
+#cmakedefine TIFF_UINT64_FORMAT @TIFF_UINT64_FORMAT@
+
+/* Unsigned 64-bit type */
+#cmakedefine TIFF_UINT64_T @TIFF_UINT64_T@
+
+/* Signed size type */
+#if defined(_WIN64)
+#define TIFF_SSIZE_T TIFF_INT64_T
+#else
+#define TIFF_SSIZE_T TIFF_INT32_T
+#endif
+
+/* Signed size type formatter */
+#if defined(_WIN64)
+#define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT
+#else
+#define TIFF_SSIZE_FORMAT "%ld"
+#endif
+
+/* The size of a `int', as computed by sizeof. */
+#cmakedefine SIZEOF_INT @SIZEOF_INT@
+
......
......@@ -5,7 +5,9 @@ ExternalProject_Add( ext_vc
URL_MD5 f2a213ae4bad0dcf4ec6469e4dad41c1
INSTALL_DIR ${PREFIX_ext_vc}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_vc} -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/vc1.2_malloc_free.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_vc} -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DCMAKE_SYSTEM_PROCESSOR=x86
UPDATE_COMMAND ""
ALWAYS 0
......
--- a/common/malloc.h
+++ b/common/malloc.h
@@ -90,6 +90,12 @@
{
#ifdef __MIC__
_mm_free(p);
+#elif defined(_WIN32)
+# ifdef __GNUC__
+ return __mingw_aligned_free(p);
+# else
+ return _aligned_free(p);
+# endif
#else
std::free(p);
#endif
SET(PREFIX_ext_zlib "${EXTPREFIX}" )
if (MSVC)
if (MSVC OR MINGW)
ExternalProject_Add(
ext_zlib
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
......
......@@ -115,7 +115,7 @@ void KisBrushMaskVectorApplicator<MaskGenerator, _impl>::processVector(const QRe
}
int simdWidth = width + alignOffset;
float *buffer = Vc::malloc<float, Vc::AlignOnVector>(simdWidth);
float *buffer = Vc::malloc<float, Vc::AlignOnCacheline>(simdWidth);
typename MaskGenerator::FastRowProcessor processor(m_maskGenerator);
......
......@@ -6,8 +6,8 @@ set -e
# Be verbose
set -x
BUILDROOT=/data2/cross
MXEROOT=/data2/cross/mxe/usr/x86_64-w64-mingw32.shared
BUILDROOT=/data2/cross2
MXEROOT=/data2/cross2/mxe/usr/x86_64-w64-mingw32.shared
APP=krita
cd $BUILDROOT
......@@ -24,6 +24,7 @@ echo $VERSION
PACKAGENAME=$APP"-"$VERSION"-x64"
rm -rf $BUILDROOT/out/$PACKAGENAME
mkdir -p $BUILDROOT/out/$PACKAGENAME
mkdir -p $BUILDROOT/out/$PACKAGENAME/bin/data
mkdir -p $BUILDROOT/out/$PACKAGENAME/lib
......@@ -49,7 +50,6 @@ cp $MXEROOT/qt5/bin/Qt5Quick.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5Script.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5ScriptTools.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5Svg.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5SystemInfo.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5Widgets.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5WinExtras.dll $BUILDROOT/out/$PACKAGENAME/bin
cp $MXEROOT/qt5/bin/Qt5Xml.dll $BUILDROOT/out/$PACKAGENAME/bin
......@@ -63,11 +63,11 @@ cp -r $MXEROOT/lib/plugins/imageformats/* $BUILDROOT/out/$PACKAGENAME/bin/imagef
mkdir $BUILDROOT/out/$PACKAGENAME/bin/translations
cp -r $BUILDROOT/qt-translations/qt_* $BUILDROOT/out/$PACKAGENAME/bin/translations
cp -r $MXEROOT/share/color $BUILDROOT/out/$PACKAGENAME/share
cp -r $MXEROOT/share/color-schemes $BUILDROOT/out/$PACKAGENAME/share
cp -r $MXEROOT/share/kf5 $BUILDROOT/out/$PACKAGENAME/share
cp -r $MXEROOT/share/krita $BUILDROOT/out/$PACKAGENAME/share
cp -r $MXEROOT/share/locale $BUILDROOT/out/$PACKAGENAME/bin/data
cp -r $MXEROOT/bin/data/color $BUILDROOT/out/$PACKAGENAME/bin/data
cp -r $MXEROOT/bin/data/color-schemes $BUILDROOT/out/$PACKAGENAME/bin/data
cp -r $MXEROOT/bin/data/kf5 $BUILDROOT/out/$PACKAGENAME/bin/data
cp -r $MXEROOT/bin/data/krita $BUILDROOT/out/$PACKAGENAME/share
cp -r $MXEROOT/bin/data/locale $BUILDROOT/out/$PACKAGENAME/bin/data
cp -r $MXEROOT/share/ocio $BUILDROOT/out/$PACKAGENAME/share
cd $BUILDROOT
......
......@@ -5,7 +5,7 @@ set(XCFTOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/xcftools")
include_directories( ${XCFTOOLS_SOURCE_DIR})
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
add_definitions(-Wno-undef -Wno-missing-format-attribute -Wno-sign-compare)
list(APPEND COMPILE_FLAGS -Wno-undef -Wno-missing-format-attribute -Wno-sign-compare)
endif ()
set(kritaxcfimport_SOURCES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment