summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-05 22:06:58 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-05 22:06:58 +0200
commitc9b3c26db59d89e320a6eb86d9558051ecba0900 (patch)
treef262530a11155451c4d60b04493ea580e7d3e054 /CMakeLists.txt
parent83ea1be016fd5fc27ee721cf62a18716675815dc (diff)
New upstream version 6.9.0upstream/6.9.0
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a9871d..6aae87b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,11 @@
cmake_minimum_required(VERSION 3.1)
-project(oniguruma VERSION 6.8.2)
+project(oniguruma VERSION 6.9.0)
set(PACKAGE onig)
set(PACKAGE_VERSION ${PROJECT_VERSION})
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+option(ENABLE_POSIX_API "Include POSIX API" ON)
set(USE_CRNL_AS_LINE_TERMINATOR 0)
set(VERSION ${PACKAGE_VERSION})
@@ -56,7 +57,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/oniguruma.pc.cmake.in ${CMAKE_CURRENT
set(_SRCS src/regint.h src/regparse.h src/regenc.h src/st.h
src/regerror.c src/regparse.c src/regext.c src/regcomp.c src/regexec.c
src/reggnu.c src/regenc.c src/regsyntax.c src/regtrav.c src/regversion.c
- src/st.c src/regposix.c src/regposerr.c src/onig_init.c
+ src/st.c src/onig_init.c
src/unicode.c src/ascii.c src/utf8.c src/utf16_be.c src/utf16_le.c
src/utf32_be.c src/utf32_le.c src/euc_jp.c src/sjis.c src/iso8859_1.c
src/iso8859_2.c src/iso8859_3.c src/iso8859_4.c src/iso8859_5.c
@@ -68,6 +69,13 @@ set(_SRCS src/regint.h src/regparse.h src/regenc.h src/st.h
src/unicode_unfold_key.c
src/unicode_fold1_key.c src/unicode_fold2_key.c src/unicode_fold3_key.c)
+set(_INST_HEADERS src/oniguruma.h src/oniggnu.h)
+
+if(ENABLE_POSIX_API)
+ set(_SRCS ${_SRCS} src/regposix.c src/regposerr.c)
+ set(_INST_HEADERS ${_INST_HEADERS} src/onigposix.h)
+endif()
+
add_library(onig ${_SRCS})
target_include_directories(onig PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
@@ -131,7 +139,7 @@ install(
# Headers:
# * src/oniguruma.h -> <prefix>/include/oniguruma
install(
- FILES src/oniguruma.h src/onigposix.h src/oniggnu.h
+ FILES ${_INST_HEADERS}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
@@ -156,11 +164,11 @@ install(FILES doc/API doc/API.ja doc/RE doc/RE.ja doc/FAQ doc/FAQ.ja
doc/CALLOUTS.BUILTIN doc/CALLOUTS.BUILTIN.ja
doc/CALLOUTS.API doc/CALLOUTS.API.ja
doc/UNICODE_PROPERTIES
- DESTINATION "${CMAKE_INSTALL_DATADIR}/${PACKAGE_NAME}")
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${PACKAGE}")
# Other files (uses onig not oniguruma for directory)
install(FILES AUTHORS COPYING HISTORY README.md
- DESTINATION "${CMAKE_INSTALL_DATADIR}/${PACKAGE_NAME}")
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${PACKAGE}")
# pkg-config
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/oniguruma.pc