+++ /dev/null
-
-project(ksaneplugin)
-
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules )
-
-find_package(KDE4 4.14.3 REQUIRED)
-include(KDE4Defaults)
-include(MacroLibrary)
-include(MacroOptionalAddSubdirectory)
-
-include_directories(${CMAKE_SOURCE_DIR}/libksane)
-add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
-include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
-
-########### target ###############
-kde4_add_plugin(ksaneplugin sanedialog.cpp)
-
-target_link_libraries(ksaneplugin ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ksane)
-
-install(TARGETS ksaneplugin DESTINATION ${PLUGIN_INSTALL_DIR} )
-
-########### install files ###############
-install( FILES ksane_scan_service.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-
+++ /dev/null
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+++ /dev/null
-# cmake macro to test if libksane is installed
-#
-# KSANE_FOUND - system has KSANE libs
-# KSANE_INCLUDE_DIR - the KSANE include directory
-# KSANE_LIBRARY - The library needed to use KSANE
-
-if (KSANE_INCLUDE_DIR)
- # Already in cache, be silent
- set(KSANE_FIND_QUIETLY TRUE)
-endif (KSANE_INCLUDE_DIR)
-
-FIND_FILE(KSANE_LOCAL_FOUND libksane/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libksane NO_DEFAULT_PATH)
-
-if (KSANE_LOCAL_FOUND)
- set(KSANE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/libs/libksane)
- set(KSANE_DEFINITIONS -I${KSANE_INCLUDE_DIR})
- set(KSANE_LIBRARY ksane)
- message(STATUS "Found KSane library in local sub-folder: ${KSANE_LIBRARY}")
- set(KSANE_FOUND TRUE)
- MARK_AS_ADVANCED(KSANE_INCLUDE_DIR KSANE_LIBRARY)
-else (KSANE_LOCAL_FOUND)
-
- FIND_PATH(KSANE_INCLUDE_DIR libksane/ksane.h ${KDE4_INCLUDES})
-
- FIND_LIBRARY(KSANE_LIBRARY ksane PATH ${KDE4_LIB_DIR})
-
- if (KSANE_INCLUDE_DIR AND KSANE_LIBRARY)
- set(KSANE_FOUND TRUE)
- else (KSANE_INCLUDE_DIR AND KSANE_LIBRARY)
- set(KSANE_FOUND FALSE)
- endif (KSANE_INCLUDE_DIR AND KSANE_LIBRARY)
-
- if (KSANE_FOUND)
- if (NOT KSane_FIND_QUIETLY)
- message(STATUS "Found libksane: ${KSANE_LIBRARY}")
- endif (NOT KSane_FIND_QUIETLY)
- else (KSANE_FOUND)
- if (KSane_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find libksane")
- endif (KSane_FIND_REQUIRED)
- endif (KSANE_FOUND)
-endif (KSANE_LOCAL_FOUND)
-
-MARK_AS_ADVANCED(KSANE_INCLUDE_DIR KSANE_LIBRARY)
\ No newline at end of file
ADD_DEFINITIONS(-DKDE_DEFAULT_DEBUG_AREA=51004)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libksane/version.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libksane/version.h)
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/libksane/version.h.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libksane/version.h
+)
# =======================================================
ADD_SUBDIRECTORY(libksane)
+ADD_SUBDIRECTORY(ksaneplugin)
+++ /dev/null
-Begin4
-Title: libksane
-Version: ${KSANE_LIB_VERSION_STRING}
-Entered-date: 2007-09-13
-Description: libksane is a C++ library for SANE interface to control flat scanners.
-Keywords: kde image sane scanner digiKam kipi-plugins
-Author: caulier dot gilles at gmail dot com (Gilles Caulier)
- kare dot sars at iki dot fi (Kare Sars)
-Maintained-by:
-Primary-site: http://www.digikam.org
-Alternate-site: http://www.digikam.org
-Original-site:
-Platforms:
-Copying-policy: LGPL
-End
--- /dev/null
+project(ksaneplugin)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../libksane)
+add_definitions(
+ ${QT_QTDBUS_DEFINITIONS}
+ -DQT_USE_FAST_CONCATENATION
+ -DQT_USE_FAST_OPERATOR_PLUS
+)
+include_directories(${QDBUS_INCLUDE_DIRS})
+
+########### target ###############
+kde4_add_plugin(ksaneplugin sanedialog.cpp)
+
+target_link_libraries(ksaneplugin ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ksane)
+
+install(TARGETS ksaneplugin DESTINATION ${PLUGIN_INSTALL_DIR} )
+
+########### install files ###############
+install( FILES ksane_scan_service.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+
${SANE_LIBRARY}
)
-SET_TARGET_PROPERTIES(ksane PROPERTIES VERSION ${KSANE_LIB_SO_VERSION_STRING} SOVERSION ${KSANE_LIB_SO_CUR_VERSION})
+SET_TARGET_PROPERTIES(ksane PROPERTIES
+ VERSION ${KSANE_LIB_SO_VERSION_STRING}
+ SOVERSION ${KSANE_LIB_SO_CUR_VERSION}
+)
OPTION(COMPILE_VIEWER_TESTAPP "Compile a small test application for the viewer")
INSTALL(TARGETS ksane ${INSTALL_TARGETS_DEFAULT_ARGS} )
-CONFIGURE_FILE(../cmake/templates/KSaneConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/KSaneConfig.cmake @ONLY)
-
-# Check if compilation is done through digiKam SC or not. If yes, do not install header files.
-IF (NOT DIGIKAMSC_COMPILE_LIBKSANE)
-
- INSTALL(FILES ksane.h
- libksane_export.h
- ${CMAKE_CURRENT_BINARY_DIR}/version.h
- DESTINATION ${INCLUDE_INSTALL_DIR}/libksane COMPONENT Devel)
+CONFIGURE_FILE(
+ ../cmake/templates/KSaneConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/KSaneConfig.cmake
+ @ONLY
+)
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/templates/libksane.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libksane.pc)
- CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/templates/libksane.lsm.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libksane.lsm)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libksane.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
+INSTALL(
+ FILES
+ ksane.h
+ libksane_export.h
+ ${CMAKE_CURRENT_BINARY_DIR}/version.h
+ DESTINATION ${INCLUDE_INSTALL_DIR}/libksane
+ COMPONENT Devel
+)
- # Install find cmake script to the system for client applications.
+CONFIGURE_FILE(
+ ${PROJECT_SOURCE_DIR}/cmake/templates/libksane.pc.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libksane.pc
+)
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libksane.pc
+ DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
+)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KSaneConfig.cmake
- DESTINATION ${LIB_INSTALL_DIR}/cmake/KSane)
+# Install find cmake script to the system for client applications.
-ENDIF()
+INSTALL(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/KSaneConfig.cmake
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/KSane
+)
KDE4_INSTALL_ICONS(${ICON_INSTALL_DIR})