add an option to disable support for OpenCLOn12

setting this option breaks a dependency on the Windows SDK
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9f4358..14115bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,6 +112,11 @@
 if (WIN32)
     target_link_libraries (OpenCL cfgmgr32.lib RuntimeObject.lib)
 
+    option (OPENCL_ICD_LOADER_DISABLE_OPENCLON12 "Disable support for OpenCLOn12. Support for OpenCLOn12 should only be disabled when building an import lib to link with, and must be enabled when building an ICD loader for distribution!" OFF)
+    if (OPENCL_ICD_LOADER_DISABLE_OPENCLON12)
+        target_compile_definitions(OpenCL PRIVATE OPENCL_ICD_LOADER_DISABLE_OPENCLON12)
+    endif()
+
     if(NOT USE_DYNAMIC_VCXX_RUNTIME)
         string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
         string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
diff --git a/README.md b/README.md
index fcea27c..9721bbc 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,10 @@
 The OpenCL ICD Loader uses CMake for its build system.
 If CMake is not provided by your build system or OS package manager, please consult the [CMake website](https://cmake.org).
 
+The Windows OpenCL ICD Loader requires the Windows SDK to check for and enumerate the OpenCLOn12 ICD.
+An OpenCL ICD Loader can be built without a dependency on the Windows SDK using the CMake variable `OPENCL_ICD_LOADER_DISABLE_OPENCLON12`.
+This variable should only be used when building an import lib to link with, and must be enabled when building an OpenCL ICD Loader for distribution!
+
 ### Build and Install Directories
 
 A common convention is to place the `build` directory in the top directory of the repository and to place the `install` directory as a child of the `build` directory.
diff --git a/loader/windows/icd_windows_apppackage.cpp b/loader/windows/icd_windows_apppackage.cpp
index 0092c2a..a8a0faa 100644
--- a/loader/windows/icd_windows_apppackage.cpp
+++ b/loader/windows/icd_windows_apppackage.cpp
@@ -48,6 +48,10 @@
 
 extern "C" bool khrIcdOsVendorsEnumerateAppPackage()
 {
+#ifdef OPENCL_ICD_LOADER_DISABLE_OPENCLON12
+    KHR_ICD_TRACE("OpenCLOn12 is disabled\n");
+    return false;
+#else
     HRESULT hrInit = Windows::Foundation::Initialize(RO_INIT_MULTITHREADED);
     if (hrInit == RPC_E_CHANGED_MODE)
     {
@@ -164,4 +168,5 @@
         return true;
     }
     return false;
+#endif
 }
\ No newline at end of file