Fix windows build

This commit is contained in:
Phillip Stephens 2021-02-20 15:02:36 -08:00
parent 76966831b0
commit 732a59c983
2 changed files with 10 additions and 8 deletions

View File

@ -10,14 +10,17 @@ file(GLOB QUAZIP_SRCS quazip/quazip/*.c quazip/quazip/*.cpp quazip/quazip/*.h)
list(REMOVE_ITEM QUAZIP_SRCS list(REMOVE_ITEM QUAZIP_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quagzipfile.cpp ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quagzipfile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quagzipfile.h ${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quagzipfile.h
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quaadler32.cpp
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quaadler32.h
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quacrc32.cpp
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quacrc32.h
) )
if (NOT MSVC) if (NOT MSVC)
set_source_files_properties(${QUAZIP_SRCS} PROPERTIES COMPILE_OPTIONS -Wno-deprecated-declarations) set_source_files_properties(${QUAZIP_SRCS} PROPERTIES COMPILE_OPTIONS -Wno-deprecated-declarations)
set(QUAZIP_LIBS ${ZLIB_LIBRARIES})
else()
set(QUAZIP_LIBS "")
endif() endif()
set(QUAZIP_LIBS ${ZLIB_LIBRARIES})
add_executable(hecl-gui WIN32 MACOSX_BUNDLE add_executable(hecl-gui WIN32 MACOSX_BUNDLE
ArgumentEditor.cpp ArgumentEditor.cpp
ArgumentEditor.hpp ArgumentEditor.hpp
@ -111,10 +114,8 @@ if(WIN32)
platforms/win/hecl-gui.manifest platforms/win/hecl-gui.manifest
platforms/win/hecl-gui.rc platforms/win/hecl-gui.rc
) )
# Check for static linking target_link_libraries(hecl-gui PRIVATE
if(NOT "$<TARGET_PROPERTY:hecl-gui,MSVC_RUNTIME_LIBRARY>" MATCHES "DLL$") Version)
target_link_libraries(hecl-gui PRIVATE Qt5::QWindowsIntegrationPlugin)
endif()
elseif(APPLE) elseif(APPLE)
target_sources(hecl-gui PRIVATE platforms/mac/mainicon.icns) target_sources(hecl-gui PRIVATE platforms/mac/mainicon.icns)
set_source_files_properties(platforms/mac/mainicon.icns PROPERTIES set_source_files_properties(platforms/mac/mainicon.icns PROPERTIES

View File

@ -17,6 +17,7 @@
#include <TlHelp32.h> #include <TlHelp32.h>
static void KillProcessTree(QProcess& proc) { static void KillProcessTree(QProcess& proc) {
#if 0
Q_PID pid = proc.pid(); Q_PID pid = proc.pid();
if (!pid) if (!pid)
return; return;
@ -45,7 +46,7 @@ static void KillProcessTree(QProcess& proc) {
bContinue = ::Process32Next(hSnap, &pe); bContinue = ::Process32Next(hSnap, &pe);
} }
} }
#endif
proc.close(); proc.close();
proc.terminate(); proc.terminate();
} }