From 76717154a05fc8b42a8beeab691a0920f8d62265 Mon Sep 17 00:00:00 2001 From: Adrien Bertrand Date: Sun, 25 Aug 2024 19:26:41 +0200 Subject: [PATCH] windows: fix cmake build for x86. DHA might not actually work at runtime, but at least everything builds. --- libticables/trunk/CMakeLists.txt | 4 ++-- libticables/trunk/src/win32/dha.h | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libticables/trunk/CMakeLists.txt b/libticables/trunk/CMakeLists.txt index 964733225..cb6b0bec6 100644 --- a/libticables/trunk/CMakeLists.txt +++ b/libticables/trunk/CMakeLists.txt @@ -39,8 +39,8 @@ set(PUBLIC_HEADERS src/timeout.h) if(WIN32) - list(APPEND HEADER_FILES "src/win64/rwp.h") - list(APPEND SRC_FILES "src/win64/rwp.c") + list(APPEND HEADER_FILES "src/win64/rwp.h" "src/win32/dha.h") + list(APPEND SRC_FILES "src/win64/rwp.c" "src/win32/dha.c") endif() # external deps lookup diff --git a/libticables/trunk/src/win32/dha.h b/libticables/trunk/src/win32/dha.h index 440ed918d..d8fb65ff8 100644 --- a/libticables/trunk/src/win32/dha.h +++ b/libticables/trunk/src/win32/dha.h @@ -22,9 +22,18 @@ #ifndef __DHA_H__ #define __DHA_H__ +#ifdef __cplusplus +extern "C" +{ +#endif + int dha_detect(int* result); int dha_enable(void); int dha_disable(void); +#ifdef __cplusplus +} +#endif + #endif