INCLUDE(GNUInstallDirs)
-FILE(GLOB VKH_SRC src/*.c src/deps/*.c)
+FILE(GLOB VKH_SRC src/*.c)
+
+IF (WIN32)
+LIST(APPEND VKH_SRC src/deps/*.c)
+ENDIF()
CONFIGURE_FILE(vkh.pc.in vkh.pc @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/vkh.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
#include <vulkan/vulkan.h>
+#if defined(_WIN32) || defined(WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN64) || defined(__WIN64__)
#include "deps/tinycthread.h"
-
+#else
+// For platforms outside of Windows, Threads.h is provided for by compiler that supports C11 standard.
+#include <threads.h>
+#endif
typedef enum VmaMemoryUsage VmaMemoryUsage;
#include <stdlib.h>
'src/vkh_presenter.c',
'src/vkh_queue.c',
'src/vkhelpers.c',
- 'src/deps/tinycthread.c',
'src/VmaUsage.cpp'
]
+if (host_machine.system() == 'windows')
+ vkh_src += 'src/deps/tinycthread.c'
+endif
+
vkh_include = [
'include',
'src',