summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-05 22:32:59 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-05 22:32:59 +0200
commit6a3c5a588240760f577cf090c5e484b821af1873 (patch)
treed527e9ced7d531815e9d43bec38e62a6cd53de36 /CMakeLists.txt
parenta38d6e8f8417b777925660269969ce2d353808ef (diff)
parentb0132ba11e2c7609d7b50ffa56532a357efe6e2a (diff)
Merge branch 'feature/upstream' into develop
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