Warning, /graphics/kooka/app/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 ########### dependencies ###############
0017 
0018 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS PrintSupport)
0019 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n Config TextWidgets KIO IconThemes)
0020 
0021 ############### Packages used by KDE ###############
0022 
0023 include(CheckIncludeFile)
0024 include(CheckFunctionExists)
0025 
0026 ############### Find the stuff we need ###############
0027 
0028 check_function_exists(strerror HAVE_STRERROR)
0029 if (HAVE_STRERROR)
0030   check_include_file(errno.h HAVE_ERRNO_H)              # pointless if no strerror()
0031 endif (HAVE_STRERROR)
0032 check_include_file(sys/stat.h HAVE_SYS_STAT_H)
0033 check_include_file(sys/types.h HAVE_SYS_TYPES_H)
0034 
0035 ########### setup ###############
0036 
0037 if (HAVE_ERRNO_H)
0038   add_definitions(-DHAVE_ERRNO_H)
0039 endif (HAVE_ERRNO_H)
0040 if (HAVE_STRERROR)
0041   add_definitions(-DHAVE_STRERROR)
0042 endif (HAVE_STRERROR)
0043 if (HAVE_SYS_STAT_H)
0044   add_definitions(-DHAVE_SYS_STAT_H)
0045 endif (HAVE_SYS_STAT_H)
0046 if (HAVE_SYS_TYPES_H)
0047   add_definitions(-DHAVE_SYS_TYPES_H)
0048 endif (HAVE_SYS_TYPES_H)
0049 
0050 include_directories(..)
0051 
0052 ########### logging ###############
0053 
0054 ecm_qt_declare_logging_category(kooka_LOG_SRCS
0055   HEADER "kooka_logging.h"
0056   IDENTIFIER "KOOKA_LOG"
0057   CATEGORY_NAME "kooka"
0058   EXPORT kookalogging
0059   DESCRIPTION "application (Kooka)")
0060 
0061 ########### library shared with plugins ###############
0062 
0063 set(kookacore_SRCS
0064   pluginmanager.cpp
0065   abstractplugin.cpp
0066   scangallery.cpp
0067   imgsaver.cpp                  # -> imagesaver
0068   formatdialog.cpp
0069   galleryroot.cpp
0070   kookaprint.cpp
0071   imgprintdialog.cpp
0072   ${kooka_LOG_SRCS}
0073 )
0074 kconfig_add_kcfg_files(kookacore_SRCS kookasettings.kcfgc)
0075 
0076 add_library(kookacore SHARED ${kookacore_SRCS})
0077 generate_export_header(kookacore BASE_NAME kookacore)
0078 set_target_properties(kookacore PROPERTIES SOVERSION "2.0.0")
0079 target_link_libraries(kookacore Qt::Core Qt::Gui Qt::PrintSupport)
0080 target_link_libraries(kookacore KF5::I18n KF5::KIOFileWidgets KF5::KIOWidgets KF5::IconThemes KF5::ConfigGui)
0081 target_link_libraries(kookacore kookascan)
0082 target_link_libraries(kookacore libfiletree)
0083 
0084 if (INSTALL_BINARIES)
0085   install(TARGETS kookacore ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0086 endif (INSTALL_BINARIES)
0087 
0088 ########### executable ###############
0089 
0090 # TODO: rename some of these files to match class name, some others are obsolete
0091 set(kooka_SRCS
0092   main.cpp
0093   kooka.cpp                     # -> kookamainwindow
0094   kookaview.cpp
0095   statusbarmanager.cpp
0096   kookapref.cpp                 # -> kookaprefs
0097   prefspages.cpp
0098   kookascanparams.cpp
0099   imagetransform.cpp
0100   galleryhistory.cpp
0101   kookagallery.cpp
0102   thumbview.cpp
0103   kookaprint.cpp
0104   imgprintdialog.cpp
0105   scanpresetsdialog.cpp
0106   newscanpresetdialog.cpp
0107   ocrresedit.cpp
0108   ${kooka_LOG_SRCS}
0109 
0110   kooka.qrc
0111 )
0112 
0113 add_executable(kooka ${kooka_SRCS})
0114 target_link_libraries(kooka
0115   Qt::PrintSupport
0116   dialogutil
0117   kookacore
0118   kookadestination
0119   kookaocr
0120   KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets
0121   KF5::XmlGui
0122   KF5::TextWidgets
0123 )
0124 
0125 include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
0126 add_dependencies(kooka vcsversion)
0127 
0128 ########### install files ###############
0129 
0130 if (INSTALL_BINARIES)
0131   install(TARGETS kooka ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0132 endif (INSTALL_BINARIES)
0133 install(FILES kookasettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
0134 
0135 # I18n for both kooka and libkookascan
0136 ki18n_install(../po)
0137 
0138 ########### subdirectories ###############
0139 
0140 add_subdirectory(pics)
0141 add_subdirectory(desktop)