]> granicus.if.org Git - icinga2/commitdiff
Integrate UTF8-CPP into CMake
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 14 Mar 2019 08:32:09 +0000 (09:32 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Fri, 15 Mar 2019 12:34:20 +0000 (13:34 +0100)
CMakeLists.txt
cmake/FindUTF8CPP.cmake [new file with mode: 0644]

index 3556d3a9672c58bf2462ceecb1cca9bd707e9827..20455cf8144619ae8e7e96dbc6ee72694aba4130 100644 (file)
@@ -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 (file)
index 0000000..b000353
--- /dev/null
@@ -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 ()