mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 14:27:55 +08:00
4962638f66
* [tre] Add CMake config files. * Fix license. * Address PR feedback. Co-authored-by: LilyWangLL <494550702@qq.com> Co-authored-by: Kai Pastor <dg0yt@darc.de> * Update version database. --------- Co-authored-by: LilyWangLL <494550702@qq.com> Co-authored-by: Kai Pastor <dg0yt@darc.de>
50 lines
1.0 KiB
CMake
50 lines
1.0 KiB
CMake
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)
|