Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-12-01 Thread Nick Østergaard
It uses -G "Visual Studio 15 2017" as the generator.

On Sun, 1 Dec 2019 at 23:45, Jon Evans  wrote:
>
> What environment does that build use? My patches were necessary for VS2019 
> using default compiler settings
>
> On Sun, Dec 1, 2019, 17:32 Nick Østergaard  wrote:
>>
>> Oh, ok. Then I wonder why Jon needed to patch it.
>>
>> On Sun, 1 Dec 2019 at 20:14, Simon Richter  wrote:
>> >
>> > Hi Nick,
>> >
>> > On 01.12.19 20:07, Nick Østergaard wrote:
>> >
>> > > OK, cool, it looks like the msvc builds on jenkins are back in green 
>> > > again :)
>> >
>> > > https://jenkins.simonrichter.eu/job/windows-kicad-msvc-head/
>> >
>> > They were broken at the same time as the Linux builds :)
>> >
>> >Simon
>> >
>> > ___
>> > Mailing list: https://launchpad.net/~kicad-developers
>> > Post to : kicad-developers@lists.launchpad.net
>> > Unsubscribe : https://launchpad.net/~kicad-developers
>> > More help   : https://help.launchpad.net/ListHelp
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-12-01 Thread Jon Evans
What environment does that build use? My patches were necessary for VS2019
using default compiler settings

On Sun, Dec 1, 2019, 17:32 Nick Østergaard  wrote:

> Oh, ok. Then I wonder why Jon needed to patch it.
>
> On Sun, 1 Dec 2019 at 20:14, Simon Richter 
> wrote:
> >
> > Hi Nick,
> >
> > On 01.12.19 20:07, Nick Østergaard wrote:
> >
> > > OK, cool, it looks like the msvc builds on jenkins are back in green
> again :)
> >
> > > https://jenkins.simonrichter.eu/job/windows-kicad-msvc-head/
> >
> > They were broken at the same time as the Linux builds :)
> >
> >Simon
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-12-01 Thread Nick Østergaard
Oh, ok. Then I wonder why Jon needed to patch it.

On Sun, 1 Dec 2019 at 20:14, Simon Richter  wrote:
>
> Hi Nick,
>
> On 01.12.19 20:07, Nick Østergaard wrote:
>
> > OK, cool, it looks like the msvc builds on jenkins are back in green again 
> > :)
>
> > https://jenkins.simonrichter.eu/job/windows-kicad-msvc-head/
>
> They were broken at the same time as the Linux builds :)
>
>Simon
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-12-01 Thread Simon Richter
Hi Nick,

On 01.12.19 20:07, Nick Østergaard wrote:

> OK, cool, it looks like the msvc builds on jenkins are back in green again :)

> https://jenkins.simonrichter.eu/job/windows-kicad-msvc-head/

They were broken at the same time as the Linux builds :)

   Simon



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-12-01 Thread Nick Østergaard
OK, cool, it looks like the msvc builds on jenkins are back in green again :)

https://jenkins.simonrichter.eu/job/windows-kicad-msvc-head/

On Sat, 30 Nov 2019 at 03:19, Jon Evans  wrote:
>
> Hi Brian,
>
> I will try to write a better guide, especially if I can get a full (all 
> options) KiCad build going rather than a minimal one.
>
> In the meantime, I'm attaching my CMakeSettings.json from VS2019 in case it's 
> helpful.
> It has a hard-coded toolchain path that you'll have to check/update.
>
> I installed all the dependencies that were available in vcpkg, and then 
> disabled whatever was left (ngspice, OCE, and python stuff)
> Then I set up that CMakeSettings and basically things work :)
>
> By the way, I pushed my patches from my earlier email, let me know if anyone 
> has an issue with the change to the CMake script.
>
> Best,
> Jon
>
> On Sun, Nov 24, 2019 at 6:56 PM Brian Piccioni  
> wrote:
>>
>> Jon
>>
>>
>>
>> Despite MSVC Community being from MS, I see some advantages in using it, 
>> namely that it is basically a one-package solution: no msys2, no loads of 
>> other tools that have to be updated, etc..
>>
>>
>>
>> My lack of cmake-foo meant I hit a roadblock when trying to build an MSVC 
>> recipe. One time I got so far as to have it crap out on SSL or something 
>> like that but now I’m stuck much earlier.
>>
>>
>>
>> In any event I’m more than happy to experiment with whatever you’ve got, 
>> especially if you can provide some guidance.
>>
>>
>>
>> Brian
>>
>>
>>
>> From: Jon Evans
>> Sent: November 24, 2019 12:41 PM
>> To: KiCad Developers
>> Subject: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build
>>
>>
>>
>> Hi all,
>>
>>
>>
>> I got a build working using Visual Studio 2019 and vcpkg.
>>
>> Attached are three patches I needed to make so far.
>>
>> I'd appreciate some double-checking on these since cmake and wxwidgets can 
>> be a bit perilous.
>>
>>
>>
>> Thanks,
>>
>> -Jon
>>
>>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-29 Thread Brian Piccioni
Jon Thanks so much! I am busy working with Alexander on renumbering so it may take me a few days to see if I can get it to work. Brian From: Jon EvansSent: November 29, 2019 9:19 PMTo: Brian PiccioniCc: KiCad DevelopersSubject: Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build Hi Brian, I will try to write a better guide, especially if I can get a full (all options) KiCad build going rather than a minimal one. In the meantime, I'm attaching my CMakeSettings.json from VS2019 in case it's helpful.It has a hard-coded toolchain path that you'll have to check/update. I installed all the dependencies that were available in vcpkg, and then disabled whatever was left (ngspice, OCE, and python stuff)Then I set up that CMakeSettings and basically things work :) By the way, I pushed my patches from my earlier email, let me know if anyone has an issue with the change to the CMake script. Best,Jon On Sun, Nov 24, 2019 at 6:56 PM Brian Piccioni <br...@documenteddesigns.com> wrote:Jon Despite MSVC Community being from MS, I see some advantages in using it, namely that it is basically a one-package solution: no msys2, no loads of other tools that have to be updated, etc..  My lack of cmake-foo meant I hit a roadblock when trying to build an MSVC recipe. One time I got so far as to have it crap out on SSL or something like that but now I’m stuck much earlier. In any event I’m more than happy to experiment with whatever you’ve got, especially if you can provide some guidance. Brian From: Jon EvansSent: November 24, 2019 12:41 PMTo: KiCad DevelopersSubject: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build Hi all, I got a build working using Visual Studio 2019 and vcpkg.Attached are three patches I needed to make so far.I'd appreciate some double-checking on these since cmake and wxwidgets can be a bit perilous. Thanks,-Jon  

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-29 Thread Jon Evans
Hi Brian,

I will try to write a better guide, especially if I can get a full (all
options) KiCad build going rather than a minimal one.

In the meantime, I'm attaching my CMakeSettings.json from VS2019 in case
it's helpful.
It has a hard-coded toolchain path that you'll have to check/update.

I installed all the dependencies that were available in vcpkg, and then
disabled whatever was left (ngspice, OCE, and python stuff)
Then I set up that CMakeSettings and basically things work :)

By the way, I pushed my patches from my earlier email, let me know if
anyone has an issue with the change to the CMake script.

Best,
Jon

On Sun, Nov 24, 2019 at 6:56 PM Brian Piccioni 
wrote:

> Jon
>
>
>
> Despite MSVC Community being from MS, I see some advantages in using it,
> namely that it is basically a one-package solution: no msys2, no loads of
> other tools that have to be updated, etc..
>
>
>
> My lack of cmake-foo meant I hit a roadblock when trying to build an MSVC
> recipe. One time I got so far as to have it crap out on SSL or something
> like that but now I’m stuck much earlier.
>
>
>
> In any event I’m more than happy to experiment with whatever you’ve got,
> especially if you can provide some guidance.
>
>
>
> Brian
>
>
>
> *From: *Jon Evans 
> *Sent: *November 24, 2019 12:41 PM
> *To: *KiCad Developers 
> *Subject: *[Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg
> build
>
>
>
> Hi all,
>
>
>
> I got a build working using Visual Studio 2019 and vcpkg.
>
> Attached are three patches I needed to make so far.
>
> I'd appreciate some double-checking on these since cmake and wxwidgets can
> be a bit perilous.
>
>
>
> Thanks,
>
> -Jon
>
>
>


CMakeSettings.json
Description: application/json
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-24 Thread Brian Piccioni
Jon Despite MSVC Community being from MS, I see some advantages in using it, namely that it is basically a one-package solution: no msys2, no loads of other tools that have to be updated, etc..  My lack of cmake-foo meant I hit a roadblock when trying to build an MSVC recipe. One time I got so far as to have it crap out on SSL or something like that but now I’m stuck much earlier. In any event I’m more than happy to experiment with whatever you’ve got, especially if you can provide some guidance. Brian From: Jon EvansSent: November 24, 2019 12:41 PMTo: KiCad DevelopersSubject: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build Hi all, I got a build working using Visual Studio 2019 and vcpkg.Attached are three patches I needed to make so far.I'd appreciate some double-checking on these since cmake and wxwidgets can be a bit perilous. Thanks,-Jon 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-24 Thread Jon Evans
I have not tried to get those working yet, I have them disabled by flags.
I can try to see what was involved in adding new packages.

-Jon

On Sun, Nov 24, 2019 at 5:17 PM Wayne Stambaugh 
wrote:

> Hey Jon,
>
> I was playing around with vcpkg a couple of weeks ago and it's works
> surprisingly well.  There is finally a sane way to build dependencies
> and compile and link against them on windows.  The dependencies I could
> not find in vcpkg are ngspice and wxPhoenix/wxWidgets which means that
> we could not build and debug the simulator code and the wx python
> extension support.  Did someone recently add ngspice and wxPhoneix to
> vcpkg?  The Python code is also somewhat different as I assume that you
> would use the default python install to build the Python extensions.
>
> Cheers,
>
> Wayne
>
> On 11/24/19 12:40 PM, Jon Evans wrote:
> > Hi all,
> >
> > I got a build working using Visual Studio 2019 and vcpkg.
> > Attached are three patches I needed to make so far.
> > I'd appreciate some double-checking on these since cmake and wxwidgets
> > can be a bit perilous.
> >
> > Thanks,
> > -Jon
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-24 Thread Wayne Stambaugh
Once all of the dependencies for vcpkg are in place, I could see
actually using VS for development (I can't beleive I'm actually typing
this) on windows.  Who knew?

On 11/24/19 5:23 PM, Ian McInerney wrote:
> I think it is still missing the OCC/OCE package as well:
> https://github.com/microsoft/vcpkg/issues/4968
> 
> -Ian
> 
> On Sun, 24 Nov 2019, 22:17 Wayne Stambaugh,  > wrote:
> 
> Hey Jon,
> 
> I was playing around with vcpkg a couple of weeks ago and it's works
> surprisingly well.  There is finally a sane way to build dependencies
> and compile and link against them on windows.  The dependencies I could
> not find in vcpkg are ngspice and wxPhoenix/wxWidgets which means that
> we could not build and debug the simulator code and the wx python
> extension support.  Did someone recently add ngspice and wxPhoneix to
> vcpkg?  The Python code is also somewhat different as I assume that you
> would use the default python install to build the Python extensions.
> 
> Cheers,
> 
> Wayne
> 
> On 11/24/19 12:40 PM, Jon Evans wrote:
> > Hi all,
> >
> > I got a build working using Visual Studio 2019 and vcpkg.
> > Attached are three patches I needed to make so far.
> > I'd appreciate some double-checking on these since cmake and wxwidgets
> > can be a bit perilous.
> >
> > Thanks,
> > -Jon
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@lists.launchpad.net
> 
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@lists.launchpad.net
> 
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-24 Thread Ian McInerney
I think it is still missing the OCC/OCE package as well:
https://github.com/microsoft/vcpkg/issues/4968

-Ian

On Sun, 24 Nov 2019, 22:17 Wayne Stambaugh,  wrote:

> Hey Jon,
>
> I was playing around with vcpkg a couple of weeks ago and it's works
> surprisingly well.  There is finally a sane way to build dependencies
> and compile and link against them on windows.  The dependencies I could
> not find in vcpkg are ngspice and wxPhoenix/wxWidgets which means that
> we could not build and debug the simulator code and the wx python
> extension support.  Did someone recently add ngspice and wxPhoneix to
> vcpkg?  The Python code is also somewhat different as I assume that you
> would use the default python install to build the Python extensions.
>
> Cheers,
>
> Wayne
>
> On 11/24/19 12:40 PM, Jon Evans wrote:
> > Hi all,
> >
> > I got a build working using Visual Studio 2019 and vcpkg.
> > Attached are three patches I needed to make so far.
> > I'd appreciate some double-checking on these since cmake and wxwidgets
> > can be a bit perilous.
> >
> > Thanks,
> > -Jon
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-24 Thread Wayne Stambaugh
Hey Jon,

I was playing around with vcpkg a couple of weeks ago and it's works
surprisingly well.  There is finally a sane way to build dependencies
and compile and link against them on windows.  The dependencies I could
not find in vcpkg are ngspice and wxPhoenix/wxWidgets which means that
we could not build and debug the simulator code and the wx python
extension support.  Did someone recently add ngspice and wxPhoneix to
vcpkg?  The Python code is also somewhat different as I assume that you
would use the default python install to build the Python extensions.

Cheers,

Wayne

On 11/24/19 12:40 PM, Jon Evans wrote:
> Hi all,
> 
> I got a build working using Visual Studio 2019 and vcpkg.
> Attached are three patches I needed to make so far.
> I'd appreciate some double-checking on these since cmake and wxwidgets
> can be a bit perilous.
> 
> Thanks,
> -Jon
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH] Fixes for Visual Studio / vcpkg build

2019-11-24 Thread Jon Evans
Hi all,

I got a build working using Visual Studio 2019 and vcpkg.
Attached are three patches I needed to make so far.
I'd appreciate some double-checking on these since cmake and wxwidgets can
be a bit perilous.

Thanks,
-Jon
From 87674cb5a87b4d77683248b65994ef625f8a7c47 Mon Sep 17 00:00:00 2001
From: Jon Evans 
Date: Sun, 24 Nov 2019 12:30:29 -0500
Subject: [PATCH 1/3] Use wxArrayString instead of vector in
 BUS_ALIAS

Fixes linker errors on Windows/VC
See: https://trac.wxwidgets.org/ticket/10884
---
 eeschema/bus_alias.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eeschema/bus_alias.h b/eeschema/bus_alias.h
index 43073277f..b1e534007 100644
--- a/eeschema/bus_alias.h
+++ b/eeschema/bus_alias.h
@@ -22,8 +22,8 @@
 #define _BUS_ALIAS_H
 
 #include 
-#include 
 #include 
+#include 
 
 
 class SCH_SCREEN;
@@ -66,7 +66,7 @@ public:
 return m_members.size();
 }
 
-std::vector< wxString >& Members()
+wxArrayString& Members()
 {
 return m_members;
 }
@@ -87,7 +87,7 @@ protected:
 
 wxString m_name;
 
-std::vector< wxString > m_members;
+wxArrayString m_members;
 
 /**
  * The bus alias editor dialog can edit aliases from all open sheets.
-- 
2.23.0.windows.1

From 913f66479a59b39e8b9f62c2c7738a5d4fa32c26 Mon Sep 17 00:00:00 2001
From: Jon Evans 
Date: Sun, 24 Nov 2019 12:31:44 -0500
Subject: [PATCH 2/3] Mark ERC compare operators as const

Not including these is a compile error on MSW/VC
---
 eeschema/erc.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp
index bf876c191..e7b01998a 100644
--- a/eeschema/erc.cpp
+++ b/eeschema/erc.cpp
@@ -664,7 +664,7 @@ void NETLIST_OBJECT_LIST::TestforNonOrphanLabel( unsigned 
aNetItemRef, unsigned
 // the full text is "sheetpath+label" for local labels and "label" for global 
labels
 struct compare_labels
 {
-bool operator() ( const NETLIST_OBJECT* lab1, const NETLIST_OBJECT* lab2 )
+bool operator() ( const NETLIST_OBJECT* lab1, const NETLIST_OBJECT* lab2 ) 
const
 {
 wxString str1 = lab1->m_SheetPath.Path() + lab1->m_Label;
 wxString str2 = lab2->m_SheetPath.Path() + lab2->m_Label;
@@ -675,7 +675,7 @@ struct compare_labels
 
 struct compare_label_names
 {
-bool operator() ( const NETLIST_OBJECT* lab1, const NETLIST_OBJECT* lab2 )
+bool operator() ( const NETLIST_OBJECT* lab1, const NETLIST_OBJECT* lab2 ) 
const
 {
 return lab1->m_Label.Cmp( lab2->m_Label ) < 0;
 }
@@ -683,7 +683,7 @@ struct compare_label_names
 
 struct compare_paths
 {
-bool operator() ( const NETLIST_OBJECT* lab1, const NETLIST_OBJECT* lab2 )
+bool operator() ( const NETLIST_OBJECT* lab1, const NETLIST_OBJECT* lab2 ) 
const
 {
 return lab1->m_SheetPath.Path().Cmp( lab2->m_SheetPath.Path() ) < 0;
 }
-- 
2.23.0.windows.1

From 5faf8f7894c2fcb25ce9b1f13db5dc268c425d2b Mon Sep 17 00:00:00 2001
From: Jon Evans 
Date: Sun, 24 Nov 2019 12:35:32 -0500
Subject: [PATCH 3/3] Update FindwxWidgets.cmake to work under MSW/vcpkg

Taken from: 
https://github.com/CaeruleusAqua/vcpkg-wx-find/blob/master/FindwxWidgets.cmake
---
 CMakeModules/FindwxWidgets.cmake | 140 +++
 1 file changed, 105 insertions(+), 35 deletions(-)

diff --git a/CMakeModules/FindwxWidgets.cmake b/CMakeModules/FindwxWidgets.cmake
index 6a8dc90e7..8263d2c44 100644
--- a/CMakeModules/FindwxWidgets.cmake
+++ b/CMakeModules/FindwxWidgets.cmake
@@ -509,41 +509,111 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
 else()
   set(WX_LIB_DIR_PREFIX vc)
 endif()
-if(BUILD_SHARED_LIBS)
-  find_path(wxWidgets_LIB_DIR
-NAMES
-  msw/wx/setup.h
-  mswd/wx/setup.h
-  mswu/wx/setup.h
-  mswud/wx/setup.h
-  mswuniv/wx/setup.h
-  mswunivd/wx/setup.h
-  mswunivu/wx/setup.h
-  mswunivud/wx/setup.h
-PATHS
-${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll   # prefer shared
-${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib
-DOC "Path to wxWidgets libraries"
-NO_DEFAULT_PATH
-)
-else()
-  find_path(wxWidgets_LIB_DIR
-NAMES
-  msw/wx/setup.h
-  mswd/wx/setup.h
-  mswu/wx/setup.h
-  mswud/wx/setup.h
-  mswuniv/wx/setup.h
-  mswunivd/wx/setup.h
-  mswunivu/wx/setup.h
-  mswunivud/wx/setup.h
-PATHS
-${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib   # prefer static
-${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll
-DOC "Path to wxWidgets libraries"
-NO_DEFAULT_PATH
-)
-endif()
+   
+   if(VCPKG_TOOLCHAIN)
+   set(wxWidgets_FOUND TRUE)
+   find_path(wxWidgets_ROOT_DIR
+   NAMES include/wx/wx.h
+   PATHS
+   ENV wxWidgets_ROOT_DIR
+   DOC "wxWidgets base/installation directory"
+