aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/wren/CMakeLists.txt
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/wren/CMakeLists.txt
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/wren/CMakeLists.txt')
-rw-r--r--vcpkg/ports/wren/CMakeLists.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/vcpkg/ports/wren/CMakeLists.txt b/vcpkg/ports/wren/CMakeLists.txt
new file mode 100644
index 0000000..b57a6a9
--- /dev/null
+++ b/vcpkg/ports/wren/CMakeLists.txt
@@ -0,0 +1,50 @@
+# CMake taken from https://github.com/walterschell/wren/blob/cmake/CMakeLists.txt
+
+# Need transitive dependencies introduced in 2.8.12
+cmake_minimum_required(VERSION 2.8.12)
+
+project(Wren LANGUAGES "C")
+
+set(wren_warning_flags "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter")
+
+IF (WIN32)
+ ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS )
+ENDIF ()
+
+set(opt_DIR "src/optional")
+set(vm_DIR "src/vm")
+
+# TODO: Don't glob
+file(GLOB opt_SRCS ${opt_DIR}/*.c)
+file(GLOB vm_SRCS ${vm_DIR}/*.c)
+
+set(wren_SRCS ${vm_SRCS} ${opt_SRCS})
+
+add_library(wren ${wren_SRCS})
+
+target_include_directories(wren PUBLIC src/include PRIVATE src/vm src/optional)
+
+target_link_libraries(wren INTERFACE m)
+
+target_compile_options(wren PRIVATE "-Wall")
+
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ target_compile_options(wren PUBLIC -DDEBUG)
+endif()
+
+
+INSTALL (TARGETS wren
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+)
+
+
+IF (NOT DEFINED SKIP_INSTALL_HEADERS)
+ INSTALL(
+ FILES
+ src/include/wren.h
+ src/include/wren.hpp
+ DESTINATION include
+ )
+ENDIF ()