From f66c57369a067a66d99e60ed6ddf82a9540a13b2 Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Fri, 29 Nov 2019 00:05:20 -0500 Subject: [PATCH] windows fixes update chigraph update minimum required cmake char type fs --- CMakeLists.txt | 2 +- chigraph | 2 +- src/CMakeLists.txt | 32 ++++++++++++++++++++------------ src/subprocessoutputview.cpp | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 011ec01..c61a9aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.10) project(chigraph-gui) diff --git a/chigraph b/chigraph index d27d52d..544e1a2 160000 --- a/chigraph +++ b/chigraph @@ -1 +1 @@ -Subproject commit d27d52df70c8f3d25c640cd98230aa75cb39afa6 +Subproject commit 544e1a267509143fdb40db15c64268f0003f59bc diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 31d71d0..5ca5c16 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,7 +50,10 @@ include(FeatureSummary) find_package(Qt5 5.6.0 REQUIRED COMPONENTS Gui Script Xml Core Widgets Network PrintSupport Svg) find_package(Qt5 5.6.0 COMPONENTS DBus) -find_package(KF5 REQUIRED COMPONENTS Archive TextEditor JobWidgets DBusAddons KIO Crash Sonnet SyntaxHighlighting Parts GuiAddons ItemViews Config ConfigWidgets Auth Codecs Completion GlobalAccel Service WindowSystem CoreAddons I18n XmlGui WidgetsAddons TextWidgets IconThemes) +find_package(KF5 REQUIRED COMPONENTS + Attica Archive TextEditor JobWidgets DBusAddons KIO Crash Sonnet SyntaxHighlighting + Parts GuiAddons ItemViews Config ConfigWidgets Auth Codecs Completion GlobalAccel + Service WindowSystem CoreAddons I18n XmlGui WidgetsAddons TextWidgets IconThemes) set(CMAKE_CXX_STANDARD 17) @@ -148,14 +151,14 @@ if(WIN32) foreach(QTLIB Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Script Qt5::Network Qt5::DBus Qt5::Svg Qt5::PrintSupport Qt5::Xml - KF5::Crash KF5::Parts KF5::KIOCore KF5::KIOWidgets + KF5::Attica KF5::Crash KF5::Parts KF5::KIOCore KF5::KIOWidgets KF5::JobWidgets KF5::TextEditor KF5::SyntaxHighlighting KF5::DBusAddons KF5::Archive KF5::ConfigWidgets KF5::GuiAddons KF5::ItemViews KF5::Codecs KF5::Auth KF5::Completion KF5::SonnetCore KF5::SonnetUi - KF5::Service KF5::ConfigGui KF5::ConfigCore KF5::WindowSystem + KF5::Service KF5::ConfigGui KF5::WindowSystem KF5::GlobalAccel KF5::CoreAddons KF5::I18n KF5::XmlGui - KF5::WidgetsAddons KF5::TextWidgets KF5::IconThemes + KF5::WidgetsAddons KF5::TextWidgets KF5::IconThemes KF5::AuthCore ) add_custom_command( @@ -170,25 +173,30 @@ if(WIN32) endforeach() + find_package(Intl REQUIRED) + get_filename_component(INTL_DIR ${Intl_LIBRARY} DIRECTORY) - # copy iconv.dll + find_file(INTL_DLL "intl.dll" HINTS "${INTL_DIR}/../bin") # "$" "$") + + # copy libintl.dll add_custom_command( TARGET copydlls POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/iconv-win64/bin/iconv.dll + ${INTL_DLL} $ - COMMENT "Copying iconv from ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/iconv-win64/bin/iconv.dll to $" + COMMENT "Copying libitnl from ${INTL_DLL} to $" ) - - # copy libintl.dll + + # copy clang + find_program(CLANG_EXE "clang") add_custom_command( TARGET copydlls POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/gettext-win64/bin/libintl.dll + ${CLANG_EXE} $ - COMMENT "Copying libitnl from ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/gettext-win64/bin/libintl.dll to $" + COMMENT "Copying clang from ${CLANG_EXE} to $" ) - + endif() install(TARGETS chigraphgui DESTINATION bin) diff --git a/src/subprocessoutputview.cpp b/src/subprocessoutputview.cpp index a1b7e85..3a02a9a 100644 --- a/src/subprocessoutputview.cpp +++ b/src/subprocessoutputview.cpp @@ -32,7 +32,7 @@ SubprocessOutputView::SubprocessOutputView(chi::GraphModule* module) : mModule(m // write it to a temporary file fs::path tempBitcodeFile = chi::makeTempPath(".bc"); - LLVMWriteBitcodeToFile(*llmod, tempBitcodeFile.c_str()); + LLVMWriteBitcodeToFile(*llmod, tempBitcodeFile.string().c_str()); setReadOnly(true); std::filesystem::path chiPath =