      enable_language(ASM_MASM)
      if(CMAKE_ASM_MASM_COMPILER_WORKS)
          if(NOT CMAKE_CL_64)
-@@ -174,12 +174,12 @@ else(UNIX AND NOT APPLE) # i.e.: Linux
+@@ -173,12 +173,12 @@ else(UNIX AND NOT APPLE) # i.e.: Linux
      endif()
  endif()
  

+    add_library(vulkan ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} dxgi_loader.c)
     add_dependencies(vulkan loader_asm_gen_files)
+    if (NOT ENABLE_STATIC_LOADER)
     target_compile_definitions(vulkan PUBLIC -DLOADER_DYNAMIC_LIB)
     set_target_properties(vulkan
                           PROPERTIES SOVERSION
                                      "1"
                                      VERSION
                                      "${VulkanHeaders_VERSION_MAJOR}.${VulkanHeaders_VERSION_MINOR}.${VulkanHeaders_VERSION_PATCH}")
+    endif()
     target_link_libraries(vulkan ${CMAKE_DL_LIBS} -lpthread -lm)
     target_link_libraries(vulkan Vulkan::Headers)
 
@@ -298,9 +300,7 @@ else()
         include(FindPkgConfig QUIET)
         if(PKG_CONFIG_FOUND)
             set(VK_API_VERSION "${VulkanHeaders_VERSION_MAJOR}.${VulkanHeaders_VERSION_MINOR}.${VulkanHeaders_VERSION_PATCH}")

 
 Name: @CMAKE_PROJECT_NAME@
-- 
2.22.0

