mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 03:11:47 +00:00
fix: SLIC3R_PCH=OFF now builds on Windows, allowing compiler caching (#15552)
This commit is contained in:
@@ -916,6 +916,9 @@ endif ()
|
||||
|
||||
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
|
||||
add_precompiled_header(libslic3r_gui pchheader.hpp FORCEINCLUDE)
|
||||
elseif (MSVC)
|
||||
# Puts the Windows headers first when the PCH is off.
|
||||
target_compile_options(libslic3r_gui PRIVATE "/FIslic3r/win_platform.hpp")
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/dragimag.h"
|
||||
#include "wx/panel.h"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "BuildCommit.hpp"
|
||||
#include "Downloader.hpp"
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <boost/locale/encoding_utf.hpp>
|
||||
#include <boost/log/detail/native_typeof.hpp>
|
||||
#include <libslic3r/Config.hpp>
|
||||
#include <mutex>
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
|
||||
OptionsGroup(wxWindow *_parent, const wxString &title, const wxString &icon, bool is_tab_opt = false,
|
||||
column_t extra_clmn = nullptr);
|
||||
~OptionsGroup() { clear(true); }
|
||||
virtual ~OptionsGroup() { clear(true); }
|
||||
|
||||
wxGridSizer* get_grid_sizer() { return m_grid_sizer; }
|
||||
const std::vector<Line>& get_lines() { return m_lines; }
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#ifndef wxMediaCtrl3_h
|
||||
#define wxMediaCtrl3_h
|
||||
|
||||
#include <chrono>
|
||||
#include "wx/window.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/uri.h"
|
||||
#include "wx/mediactrl.h"
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ class UdpSession
|
||||
{
|
||||
public:
|
||||
UdpSession(Bonjour::ReplyFn rfn);
|
||||
virtual ~UdpSession() = default;
|
||||
virtual void handle_receive(const boost::system::error_code& error, size_t bytes) = 0;
|
||||
std::vector<char> buffer;
|
||||
boost::asio::ip::udp::endpoint remote_endpoint;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
// Force-included into libslic3r_gui when SLIC3R_PCH is OFF, standing in for
|
||||
// pchheader.hpp, which includes <Windows.h> before anything else. Arriving
|
||||
// late and transitively, rpcndr.h defines a global `byte` that collides with
|
||||
// std::byte under `using namespace std`, and the control and URL moniker
|
||||
// types the GUI uses are never declared.
|
||||
#ifdef _WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <Windows.h>
|
||||
#include <CommCtrl.h>
|
||||
#include <urlmon.h>
|
||||
#endif // _WIN32
|
||||
|
||||
Reference in New Issue
Block a user