Warning, /graphics/kooka/plugins/ocr/kadmos/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 ##########################################################################
0002 ##                                                                      ##
0003 ##  This CMake file is part of Kooka, a KDE scanning/OCR application.   ##
0004 ##                                                                      ##
0005 ##  This file may be distributed and/or modified under the terms of     ##
0006 ##  the GNU General Public License version 2, as published by the       ##
0007 ##  Free Software Foundation and appearing in the file COPYING          ##
0008 ##  included in the packaging of this file.                             ##
0009 ##                                                                      ##
0010 ##  Author:  Jonathan Marten <jjm AT keelhaul DOT me DOT uk>            ##
0011 ##                                                                      ##
0012 ##########################################################################
0013 
0014 project(kooka5)
0015 
0016 #########################################################################
0017 #                                                                       #
0018 #  Options
0019 #                                                                       #
0020 #########################################################################
0021 
0022 option(KADMOS_DIR "Path to Kadmos include and library files, default '/usr/local'" "/usr/local")
0023 
0024 #########################################################################
0025 #                                                                       #
0026 #  Locating required Kadmos support                                     #
0027 #                                                                       #
0028 #########################################################################
0029 
0030 if (WITH_KADMOS)
0031   find_file(KADMOS_HEADER_FOUND kadmos.h PATHS ${KADMOS_DIR})
0032   if (KADMOS_HEADER_FOUND)
0033     string(REGEX REPLACE "/.*$" "" KADMOS_INCLUDE_DIR KADMOS_HEADER_FOUND)
0034     message(STATUS "Kadmos includes: ${KADMOS_INCLUDE_DIR}")
0035   else (KADMOS_HEADER_FOUND)
0036     message(SEND_ERROR "WITH_KADMOS requested, but Kadmos engine header file 'kadmos.h' not found in ${KADMOS_DIR} - set KADMOS_DIR to locate it")
0037   endif (KADMOS_HEADER_FOUND)
0038 
0039   find_file(KADMOS_LIB_FOUND librep.a PATHS ${KADMOS_DIR})
0040   if (KADMOS_LIB_FOUND)
0041     string(REGEX REPLACE "/.*$" "" KADMOS_LIB_DIR KADMOS_LIB_FOUND)
0042     message(STATUS "Kadmos libraries: ${KADMOS_LIB_DIR}")
0043   else (KADMOS_LIB_FOUND)
0044     message(SEND_ERROR "WITH_KADMOS requested, but Kadmos engine library 'librep.a' not found in ${KADMOS_DIR} - set KADMOS_DIR to locate it")
0045   endif (KADMOS_LIB_FOUND)
0046 
0047   set(HAVE_KADMOS true)
0048 endif (WITH_KADMOS)
0049 
0050 #########################################################################
0051 #                                                                       #
0052 #  Definitions                                                          #
0053 #                                                                       #
0054 #########################################################################
0055 
0056 if (HAVE_KADMOS)
0057   add_definitions(-DHAVE_KADMOS)
0058 
0059   if (KADMOS_INCLUDE_DIR)
0060     include_directories(${KADMOS_INCLUDE_DIR})
0061   endif (KADMOS_INCLUDE_DIR)
0062   if (KADMOS_LIB_DIR)
0063     link_directories(${KADMOS_LIB_DIR})
0064   endif (KADMOS_LIB_DIR)
0065 endif (HAVE_KADMOS)
0066 
0067 #########################################################################
0068 #                                                                       #
0069 #  OCR plugin for Kadmos                                                #
0070 #                                                                       #
0071 #########################################################################
0072 
0073 set(kadmos_SRCS
0074   ocrkadmosengine.cpp
0075   ocrkadmosdialog.cpp
0076   kadmosocr.cpp
0077   ${kookaocr_LOG_SRCS}
0078 )
0079 
0080 kcoreaddons_add_plugin(kadmos SOURCES ${kadmos_SRCS} INSTALL_NAMESPACE "kooka_ocr")
0081 
0082 kcoreaddons_desktop_to_json(kadmos kookaocr-kadmos.desktop)
0083 
0084 target_link_libraries(kadmos Qt::Core Qt::Gui)
0085 target_link_libraries(kadmos KF5::I18n KF5::WidgetsAddons)
0086 target_link_libraries(kadmos kookaocr kookascan)
0087 target_link_libraries(kadmos librep)