From 85c0d2c2cc0e651b47c1eef0a4b7bd37233e2560 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 14 Mar 2019 09:32:09 +0100 Subject: [PATCH] Integrate UTF8-CPP into CMake --- CMakeLists.txt | 4 ++++ cmake/FindUTF8CPP.cmake | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 cmake/FindUTF8CPP.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3556d3a96..20455cf81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,10 @@ else() list(APPEND base_DEPS ${YAJL_LIBRARIES}) endif() +# UTF8CPP +find_package(UTF8CPP) +include_directories(${UTF8CPP_INCLUDE}) + find_package(Editline) set(HAVE_EDITLINE "${EDITLINE_FOUND}") diff --git a/cmake/FindUTF8CPP.cmake b/cmake/FindUTF8CPP.cmake new file mode 100644 index 000000000..b00035357 --- /dev/null +++ b/cmake/FindUTF8CPP.cmake @@ -0,0 +1,7 @@ +FIND_PATH (UTF8CPP_INCLUDE utf8.h HINTS "${PROJECT_SOURCE_DIR}/third-party/utf8cpp/source") + +if (UTF8CPP_INCLUDE) + message(STATUS "Found UTF8CPP: ${UTF8CPP_INCLUDE}" ) +else () + message(FATAL_ERROR "Unable to include utf8.h") +endif () -- 2.49.0