diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/wepoll/CMakeLists.txt | |
Diffstat (limited to 'vcpkg/ports/wepoll/CMakeLists.txt')
| -rw-r--r-- | vcpkg/ports/wepoll/CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/vcpkg/ports/wepoll/CMakeLists.txt b/vcpkg/ports/wepoll/CMakeLists.txt new file mode 100644 index 0000000..cd8d29a --- /dev/null +++ b/vcpkg/ports/wepoll/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14)
+
+project(wepoll C)
+
+add_library(wepoll wepoll.c)
+
+if (MSVC)
+ if (BUILD_SHARED_LIBS)
+ target_compile_definitions(
+ wepoll
+ PRIVATE
+ "-DWEPOLL_EXPORT=__declspec(dllexport)"
+ )
+ endif ()
+
+ target_compile_options(wepoll PRIVATE /Wall /wd4127 /wd4201 /wd4242 /wd4710 /wd4711 /wd4820)
+
+ if (MSVC_VERSION GREATER_EQUAL 1900)
+ target_compile_options(wepoll PRIVATE /wd5045)
+ endif ()
+else ()
+ target_compile_definitions(
+ wepoll
+ PRIVATE
+ "-DWEPOLL_EXPORT=__attribute__((visibility(\"default\")))"
+ )
+
+ target_compile_options(wepoll PRIVATE -Wall -Wextra -Werror -fvisibility=hidden)
+endif ()
+
+target_link_libraries(wepoll PUBLIC ws2_32)
+
+set_target_properties(
+ wepoll
+ PROPERTIES
+ OUTPUT_NAME wepoll
+ PUBLIC_HEADER wepoll.h
+)
+
+install(TARGETS wepoll)
|