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/getopt-win32/CMakeLists.txt | |
Diffstat (limited to 'vcpkg/ports/getopt-win32/CMakeLists.txt')
| -rw-r--r-- | vcpkg/ports/getopt-win32/CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vcpkg/ports/getopt-win32/CMakeLists.txt b/vcpkg/ports/getopt-win32/CMakeLists.txt new file mode 100644 index 0000000..5bf9b11 --- /dev/null +++ b/vcpkg/ports/getopt-win32/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.14)
+
+project(getopt-win32 C)
+
+if(BUILD_SHARED_LIBS)
+ add_definitions(-DEXPORTS_GETOPT)
+else()
+ add_definitions(-DSTATIC_GETOPT)
+endif()
+
+add_library(getopt getopt.c)
+
+TARGET_INCLUDE_DIRECTORIES(getopt INTERFACE $<INSTALL_INTERFACE:include>)
+
+install(
+ TARGETS getopt
+ EXPORT unofficial-getopt-win32
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ INCLUDES DESTINATION include
+)
+
+install(
+ EXPORT unofficial-getopt-win32
+ NAMESPACE unofficial::getopt-win32::
+ DESTINATION share/unofficial-getopt-win32
+ FILE unofficial-getopt-win32-config.cmake
+)
|