config("vulkan_internal_config") {
defines = [
- "VULKAN_NON_CMAKE_BUILD",
"VK_ENABLE_BETA_EXTENSIONS",
]
if (is_clang || !is_win) {
check_function_exists(secure_getenv HAVE_SECURE_GETENV)
check_function_exists(__secure_getenv HAVE___SECURE_GETENV)
-if(NOT (HAVE_SECURE_GETENV OR HAVE__SECURE_GETENV))
+
+if (HAVE_SECURE_GETENV)
+ target_compile_definitions(loader_specific_options INTERFACE HAVE_SECURE_GETENV)
+endif()
+if (HAVE___SECURE_GETENV)
+ target_compile_definitions(loader_specific_options INTERFACE HAVE___SECURE_GETENV)
+endif()
+if(NOT (HAVE_SECURE_GETENV OR HAVE___SECURE_GETENV))
message(WARNING "Using non-secure environmental lookups. This loader will not properly disable environent variables when run with elevated permissions.")
endif()
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/loader_cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/loader_cmake_config.h)
if(WIN32)
if(MSVC AND NOT MSVC_VERSION LESS 1900)
#include "log.h"
-// This is a CMake generated file with #defines for if secure_getenv and __secure_getenv
-// are present.
-#if !defined(VULKAN_NON_CMAKE_BUILD)
-#include "loader_cmake_config.h"
-#endif // !defined(VULKAN_NON_CMAKE_BUILD)
-
// Environment variables
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__)