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

View File

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