Skip to content

Commit

Permalink
remaked for FindUtf8Proc.cmake;
Browse files Browse the repository at this point in the history
  • Loading branch information
F1ash committed Jun 11, 2018
1 parent eaaaba0 commit cdb4bed
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,8 @@ endif ( QT4_BUILD )
##

find_package(LibVirt REQUIRED)
# uncomment below if libutf8proc is required
#find_package(Utf8Proc REQUIRED)
if ( WITH_LXC_SUPPORT )
if (NOT APPLE)
pkg_check_modules(
Expand All @@ -1117,8 +1119,6 @@ if ( WITH_SPICE_SUPPORT )
find_package(CACard REQUIRED)
endif ()
endif ()
# uncomment below if libutf8proc is required
#find_package(LibUtf8Proc REQUIRED)

include_directories(
${GLib2_INCLUDE_DIRS}
Expand All @@ -1131,7 +1131,7 @@ include_directories(
${QTERMWIDGET_INCLUDE_DIRS}
${LIBVNCCLIENT_INCLUDE_DIRS}
${KRDC_INCLUDE_DIRS}
${LIB_UTF8_PROC_INCLUDE_DIRS}
${UTF8PROC_INCLUDE_DIRS}
)
set (VIEWER_BUILD_PROJECT_LIBRARIES
${BUILD_PROJECT_LIBRARIES})
Expand All @@ -1146,7 +1146,7 @@ list(APPEND BUILD_PROJECT_LIBRARIES
${SPICE_CLIENT_GLIB2_LIBRARIES}
${LIBVNCCLIENT_LIBRARIES}
${KRDC_LIBRARIES}
${LIB_UTF8_PROC_LIBRARIES}
${UTF8PROC_LIBRARIES}
)
list(APPEND VIEWER_BUILD_PROJECT_LIBRARIES
${GLib2_LIBRARIES}
Expand All @@ -1169,7 +1169,7 @@ MESSAGE(STATUS "Found includes :
${QTERMWIDGET_INCLUDE_DIRS}
${LIBVNCCLIENT_INCLUDE_DIRS}
${KRDC_INCLUDE_DIRS}
${LIB_UTF8_PROC_INCLUDE_DIRS}"
${UTF8PROC_INCLUDE_DIRS}"
)
MESSAGE(STATUS "Found BUILD_PROJECT_LIBRARIES: ${BUILD_PROJECT_LIBRARIES}")

Expand Down
28 changes: 0 additions & 28 deletions cmake/FindLibUtf8Proc.cmake

This file was deleted.

28 changes: 28 additions & 0 deletions cmake/FindUtf8Proc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# FindUtf8Proc.cmake

# UTF8PROC_FOUND - System has UTF8PROC
# UTF8PROC_INCLUDES - The UTF8PROC include directories
# UTF8PROC_LIBRARIES - The libraries needed to use UTF8PROC
# UTF8PROC_DEFINITIONS - Compiler switches required for using UTF8PROC

find_package(PkgConfig)
pkg_check_modules(PC_UTF8PROC QUIET utf8proc)
set(UTF8PROC_DEFINITIONS ${PC_UTF8PROC_CFLAGS_OTHER})

find_path(UTF8PROC_INCLUDE_DIR
NAMES utf8proc.h
HINTS ${PC_UTF8PROC_INCLUDEDIR} ${PC_UTF8PROC_INCLUDE_DIRS})

find_library(UTF8PROC_LIBRARY
NAMES utf8proc
HINTS ${PC_UTF8PROC_LIBDIR} ${PC_UTF8PROC_LIBRARY_DIRS})

set(UTF8PROC_LIBRARIES ${UTF8PROC_LIBRARY})
set(UTF8PROC_INCLUDE_DIRS ${UTF8PROC_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UTF8PROC DEFAULT_MSG
UTF8PROC_LIBRARY
UTF8PROC_INCLUDE_DIR)

mark_as_advanced(UTF8PROC_INCLUDE_DIR UTF8PROC_LIBRARY)

0 comments on commit cdb4bed

Please sign in to comment.