 +set(INSERT_WARNING
 +  "/* WARNING: do not edit! */\n/* Generated by CMakeLists.txt from crypto/${conf_file}.cmake */"
 +  )
-+if(NOT WIN32)
++if(WIN32)
++  set(DSO_SCHEME_MACROS
++    DSO_NONE
++    )
++elseif(UNIX)
 +  set(DSO_SCHEME_MACROS
 +    DSO_DLFCN
 +    HAVE_DLFCN_H

+  -DOPENSSL_THREADS
+  -D_REENTRANT
+  )
+if(WIN32 AND NOT CYGWIN)
+  add_definitions(
+    -DWIN32_LEAN_AND_MEAN
+    -D_CRT_SECURE_NO_WARNINGS
+    -D_WINSOCK_DEPRECATED_NO_WARNINGS
+    )
+endif()

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..1befb48
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,58 @@
+cmake_minimum_required(VERSION 3.12)
+project(openssl)
+include(flags OPTIONAL)
