Start building w/ AppVeyor (#51)

Build 3 versions under AppVeyor so that we know that no gcc specific items get pulled in.
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 0000000..60cf651
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,35 @@
+platform:
+  - x64
+
+image: Visual Studio 2017
+  
+configuration:
+  - Release
+#  - Debug   suppress this for now
+
+environment:
+  matrix:
+    - USE_CONTEXT: ON      
+      USE_EMBEDTLS: OFF
+
+    - USE_CONTEXT: OFF
+      USE_EMBEDTLS: OFF
+
+    - USE_CONTEXT: OFF
+      USE_EMBEDTLS: ON
+
+
+matrix:
+  fast_finish: true
+
+install:
+  - git submodule update --init --recursive
+  - git clone --depth 1 git://github.com/cose-wg/Examples Examples
+
+before_build:
+  - cmake --version
+  - cmake -Duse_context=%USE_CONTEXT% -Duse_embedtls=%USE_EMBEDTLS% -Dbuild_shared_libs=OFF  -G "Visual Studio 15 2017 Win64" .
+
+build_script:
+  - msbuild cose-c.sln
+  - ctest -C %CONFIGURATION%
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 96967d4..7189a1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,8 +114,15 @@
 
 ExternalProject_Get_Property(project_cn-cbor install_dir)
 include_directories ( "${install_dir}/include" )
-add_library (cn-cbor STATIC IMPORTED)
-set_property (TARGET cn-cbor PROPERTY IMPORTED_LOCATION "${install_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}cn-cbor${CMAKE_SHARED_LIBRARY_SUFFIX}")
+
+if (MSVC)
+   add_library (cn-cbor STATIC IMPORTED)
+   set_property (TARGET cn-cbor PROPERTY IMPORTED_LOCATION "${install_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}cn-cbor.lib")
+else ()
+   add_library (cn-cbor STATIC IMPORTED)
+   set_property (TARGET cn-cbor PROPERTY IMPORTED_LOCATION "${install_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}cn-cbor${CMAKE_SHARED_LIBRARY_SUFFIX}")
+endif ()
+
 add_dependencies(cn-cbor project_cn-cbor)
 
 if (use_embedtls)
@@ -131,7 +138,11 @@
    ExternalProject_Get_Property(project_embedtls install_dir)
    include_directories( "${install_dir}/include" )
    add_library( embedtls STATIC IMPORTED)
-   set_property (TARGET embedtls PROPERTY IMPORTED_LOCATION "${dist_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}mbedcrypto${CMAKE_SHARED_LIBRARY_SUFFIX}")
+   if (MSVC)
+      set_property (TARGET embedtls PROPERTY IMPORTED_LOCATION "${dist_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}mbedcrypto.lib")
+   else ()
+      set_property (TARGET embedtls PROPERTY IMPORTED_LOCATION "${dist_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}mbedcrypto${CMAKE_SHARED_LIBRARY_SUFFIX}")
+   endif ()
    add_dependencies(embedtls project_embedtls)
 endif ()