add_subdirectory(scripts)
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+set(CMAKE_C_EXTENSIONS OFF)
+set(CMAKE_C_VISIBILITY_PRESET "hidden")
+set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+
# By default, loader & tests are built without sanitizers
# Use these options to force a specific sanitizer on the loader and test executables
if (UNIX)
# Enable beta Vulkan extensions
target_compile_definitions(loader_common_options INTERFACE VK_ENABLE_BETA_EXTENSIONS)
-target_compile_features(loader_common_options INTERFACE c_std_99)
-set(LOADER_STANDARD_C_PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED YES C_EXTENSIONS OFF)
-
-# Force the use of the multithreaded, static version of the C runtime.
-set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
-
option(BUILD_WERROR "Enable warnings as errors")
# Set warnings as errors and the main diagnostic flags
endif()
endif()
- if(UNIX)
- target_compile_options(loader_common_options INTERFACE -fvisibility=hidden)
- endif()
-
target_compile_options(loader_common_options INTERFACE -Wpointer-arith)
endif()
# common attributes of the vulkan library
target_link_libraries(vulkan PRIVATE loader_specific_options)
-set_target_properties(vulkan PROPERTIES ${LOADER_STANDARD_C_PROPERTIES})
-if (TARGET asm_offset)
- set_target_properties(asm_offset PROPERTIES ${LOADER_STANDARD_C_PROPERTIES})
-endif()
-
target_link_libraries(vulkan PRIVATE Vulkan::Headers)
add_library(Vulkan::Loader ALIAS vulkan)