From 3c285e572c892c26e6ddecd322cbd62e39eb0bbd Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 13 Feb 2015 17:58:20 +0100 Subject: [PATCH] Fix compilation under win32; fix installation of lib under win32 --- oracle/CMakeLists.txt | 8 +++++++- oracle/src/zip/zipglobal.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/oracle/CMakeLists.txt b/oracle/CMakeLists.txt index 9aa0d9bb..5b6113c4 100644 --- a/oracle/CMakeLists.txt +++ b/oracle/CMakeLists.txt @@ -207,6 +207,12 @@ IF(WIN32) # these needs to be relative to CMAKE_INSTALL_PREFIX set(plugin_dest_dir Plugins) set(qtconf_dest_dir .) + list(APPEND libSearchDirs ${QT_LIBRARY_DIR}) + IF(ZLIB_FOUND) + get_filename_component(ZLIB_DLL_DIR "${ZLIB_INCLUDE_DIRS}/../bin/" REALPATH) + list(APPEND libSearchDirs ${ZLIB_DLL_DIR}) + ENDIF() + MESSAGE(STATUS "Oracle: ZLIB dll found at ${ZLIB_DLL_DIR}") # qt4: codecs, iconengines, imageformats # qt5: iconengines, imageformats, platforms @@ -225,6 +231,6 @@ Translations = Resources/translations\") \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/*.dll\") set(BU_CHMOD_BUNDLE_ITEMS ON) include(BundleUtilities) - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/oracle.exe\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\") + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/oracle.exe\" \"\${QTPLUGINS}\" \"${libSearchDirs}\") " COMPONENT Runtime) endif() \ No newline at end of file diff --git a/oracle/src/zip/zipglobal.cpp b/oracle/src/zip/zipglobal.cpp index 23e30814..5abf6a72 100755 --- a/oracle/src/zip/zipglobal.cpp +++ b/oracle/src/zip/zipglobal.cpp @@ -115,7 +115,7 @@ bool OSDAB_ZIP_MANGLE(setFileTimestamp)(const QString& fileName, const QDateTime return true; #ifdef Q_OS_WIN - HANDLE hFile = CreateFile(fileName.toStdWString().c_str(), + HANDLE hFile = CreateFileW(fileName.toStdWString().c_str(), GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0); if (hFile == INVALID_HANDLE_VALUE) { return false;