Skip to content

Commit 8f35302

Browse files
carlo-braminicharles-lunarg
authored andcommitted
Fix build for CYGWIN
Attached patch fixes build on CYGWIN. Hopefully, the patch is small and easy because it is just needed to add CYGWIN to the list of existing UNIX platforms.
1 parent f946876 commit 8f35302

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ elseif(APPLE)
108108
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
109109
target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_MACOS_MVK)
110110
endif()
111-
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU")
111+
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU|CYGWIN")
112112
option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
113113
option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
114114
option(BUILD_WSI_XLIB_XRANDR_SUPPORT "Build X11 Xrandr WSI support" ON)

loader/vk_loader_platform.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
// Set of platforms with a common set of functionality which is queried throughout the program
4646
#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNX__) || defined(__FreeBSD__) || \
47-
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__)
47+
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__) || defined(__CYGWIN__)
4848
#define COMMON_UNIX_PLATFORMS 1
4949
#else
5050
#define COMMON_UNIX_PLATFORMS 0
@@ -298,7 +298,7 @@ static inline char *loader_platform_dirname(char *path) { return dirname(path);
298298

299299
// loader_platform_executable_path finds application path + name.
300300
// Path cannot be longer than 1024, returns NULL if it is greater than that.
301-
#if defined(__linux__) || defined(__GNU__)
301+
#if defined(__linux__) || defined(__GNU__) || defined(__CYGWIN__)
302302
static inline char *loader_platform_executable_path(char *buffer, size_t size) {
303303
ssize_t count = readlink("/proc/self/exe", buffer, size);
304304
if (count == -1) return NULL;

0 commit comments

Comments
 (0)