aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/tre/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/tre/CMakeLists.txt
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/tre/CMakeLists.txt')
-rw-r--r--vcpkg/ports/tre/CMakeLists.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/vcpkg/ports/tre/CMakeLists.txt b/vcpkg/ports/tre/CMakeLists.txt
new file mode 100644
index 0000000..bfef821
--- /dev/null
+++ b/vcpkg/ports/tre/CMakeLists.txt
@@ -0,0 +1,49 @@
+cmake_minimum_required (VERSION 3.9)
+project (tre)
+
+set (HEADERS
+ lib/regex.h
+ include/tre/tre.h
+ include/tre/tre-config.h
+)
+
+set (SRCS
+ lib/regcomp.c
+ lib/regerror.c
+ lib/regexec.c
+ lib/tre-ast.c
+ lib/tre-compile.c
+ lib/tre-match-approx.c
+ lib/tre-match-backtrack.c
+ lib/tre-match-parallel.c
+ lib/tre-mem.c
+ lib/tre-parse.c
+ lib/tre-stack.c
+ lib/xmalloc.c
+ win32/tre.def
+)
+
+include_directories(win32 include/tre)
+add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H)
+if (WIN32)
+ add_definitions(-DHAVE_MALLOC_H)
+endif()
+add_library(tre ${SRCS})
+
+target_include_directories(tre PUBLIC "$<INSTALL_INTERFACE:include>")
+
+install(
+ TARGETS tre
+ EXPORT unofficial-tre-targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(
+ EXPORT unofficial-tre-targets
+ NAMESPACE unofficial::tre::
+ FILE unofficial-tre-config.cmake
+ DESTINATION share/unofficial-tre)
+
+install(FILES ${HEADERS} DESTINATION include/tre)