This project is read-only.

NuGet integration? Maybe a future feature?

Dec 21, 2014 at 5:35 AM
We've recently run into a few SDK's that are integrated via NuGet, one of which MSFT recently acquired.
https://github.com/bitstadium/HockeySDK-Windows
https://github.com/adjust/windows_sdk

Is there any way currently to setup NuGet references via cmake? It may be as simple as including a packages.config in a project and I could even test that ... but I'm really busy :) And I suspect there's a bit more work involved to get it working, such as setting source file properties within cmake.

My next trick will be to try to get that custom Windows Store version of openssl working.
Dec 21, 2014 at 7:13 AM
Turns out the HockeyApp integration doesn't matter because their SDK basically assumes your app is a Xaml app. Exception in Windows.UI.Xaml.Appliation.get_Current() .... because there's isn't one. So, time to choose a different crash logging solution.
Dec 22, 2014 at 7:21 AM
I don't think that NuGet is supported through CMake. I'll add that feature request to our backlog. It should not be very hard to add, but figuring out the right way to expose it might be tricky.

Which version of OpenSSL are you talking about?
Dec 22, 2014 at 7:32 AM
"figuring out the right way to expose it might be tricky"
I agree. IMO, ignore NuGet until cmake accepts the core WinRT integration or until lots of customers are blocked (we're not blocked). But something like target_set_properties with VS_NUGET_REFERENCES would IMO make sense and not be disruptive to non-VS cmake users.


https://github.com/microsoft/openssl

As far as large open source projects go, that wasn't so bad. As usual I'm baffled by the build system and I haven't seen it fully succeed yet. But I think I have all the lib's I need. Of course, the reason I'm compiling it is to use it with libcurl. I think it's mostly working. I have no CA certs as I get CURLE_SSL_CACERT unless I set CURLOPT_SSL_VERIFYPEER to 0 (inherently trusting the server cert), and I suspect that problem comes down to me not understanding openssl. But if you happen to know how to tell curl and/or openssl "Just use the Windows system-level CA certs" that would be helpful.


Also, github doesn't have per-project forums? odd.
Dec 22, 2014 at 7:42 AM
I just recalled the main oddity to the build. Install.WINAPP states that outputs go to "vsout\$(ProjectConfiguration)\$(Configuration)\$(Arch)\bin" however only the "-winrtcomponent" projects have outputs there. I'm succeeding by grabbing lib's from "vsout\NT-Store-8.1-Static-Unicode\Debug\Win32\bin" ().
Dec 22, 2014 at 8:02 AM
Thanks, there's a few other things in CMake that I want to fix/add before nuget. The core WinRT changes are part of the 3.1 version that was release last week. The only feature that was not included was the multi-platform support.

Good, so you're looking at my team's fork of OpenSSL. I'll double check the output of the libraries. Unfortunately, Í'm not as versed in OpenSSL as I am in CMake. I would have to suggest the OpenSSL mailing lists for help there.
Dec 22, 2014 at 9:40 AM
FYI's here basically.


From what I can tell, openssl uses schannel to access the WIndows certificate store. That doesnt' seem to be compatible with WinRT. I can probably just use our servers' certificates directly in a folder (libcurl supports that scenario).


My first attempt to build openssl for winrt failed due to v11 cpp msbuild target file trying to load v11 xaml msbuild target file. Oddly, my system has v11 cpp but not v11 xaml. I'm not sure how that would happen but dev machines tend to be tainted.

In Powershell (note the explicit '12.0' to fix the above):
cd vsout
& 'C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe' .\openssl.sln /p:Configuration=Release /p:Platform=Win32

"C:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\vsout\openssl.sln" (default target) (1) ->
"C:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\vsout\NT-Store-8.1-Dll-Unicode-testapp\NT-Store-8.1-Dll-Unicode-testapp.csproj.metaproj" (default target) (14) ->
"C:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\vsout\NT-Store-8.1-Dll-Unicode-testapp\NT-Store-8.1-Dll-Unicode-testapp.csproj" (default target) (15) ->
c:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\ms\vstemplates\MainPage.xaml.cs(93,13): error CS0103: The name 'RunTests' does not exist in the current context [C:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\vsout\NT-Store-8.1-Dll-Unicode-testapp\NT-Store-8.1-Dll-Unicode-testapp.csproj]
c:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\ms\vstemplates\MainPage.xaml.cs(99,13): error CS0103: The name 'RunTests' does not exist in the current context [C:\Users\Ted\Documents\GitHub\Slots\ext\openssl-WinRT\vsout\NT-Store-8.1-Dll-Unicode-testapp\NT-Store-8.1-Dll-Unicode-testapp.csproj]
0 Warning(s)
4 Error(s)
Dec 24, 2014 at 6:44 AM
Openssl & libcurl integration done. Works on desktop & winrt. Haven't tried winphone yet, but I'm sure it'll work.

I spent a sad amount of time trying to get libcurl/openssl to accept a CA bundle. The prebuilt 'ca-bundle.crt' on the openssl website works. The equivalent .pem doesn't. Individual crt's via the https browser padlock don't work. Not sure why there's not a better FAQ on this.

Also, I discovered MS's version of openssl requires COM. The error you get if you don't CoInit is a non-helpful exception somewhere.

Give a big 'Thanks' to your team(s)!