+macro_optional_find_package(IBus 1.1.0)
+set_package_properties(IBus PROPERTIES
+ DESCRIPTION "Intelligent Input Bus for Linux/Unix"
+ URL "https://github.com/ibus/ibus"
+ TYPE OPTIONAL
+ PURPOSE "Required by input method Plasma appelt"
+)
-include_directories(${KDE4_INCLUDES}
- ${PLASMA_INCLUDE_DIR}
- ${X11_INCLUDE_DIR}
- ${X11_Xrender_INCLUDE_PATH}
- )
-link_directories(${KDE4_LIB_DIR})
+macro_optional_find_package(SCIM)
+set_package_properties(SCIM PROPERTIES
+ DESCRIPTION "Smart Common Input Method platform"
+ URL "https://github.com/scim-im/scim"
+ TYPE OPTIONAL
+ PURPOSE "Required by input method Plasma appelt"
+)
-add_subdirectory(src)
-add_subdirectory(tests)
+include_directories(
+ ${KDE4_INCLUDES}
+ ${PLASMA_INCLUDE_DIR}
+ ${X11_INCLUDE_DIR}
+ ${X11_Xrender_INCLUDE_PATH}
+)
+add_subdirectory(src)
add_subdirectory(backend)
-
-macro_optional_add_subdirectory(scim)
-macro_optional_add_subdirectory(ibus)
\ No newline at end of file
+if(IBUS_FOUND)
+ add_subdirectory(ibus)
+endif()
+
+if(SCIM_FOUND)
+ add_subdirectory(scim)
+endif()
-find_package(IBus)
-find_package(GLIB2)
-find_package(GIO)
-find_package(GObject)
-if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND)
- include_directories(${IBUS_INCLUDE_DIR})
- include_directories(${GLIB2_INCLUDE_DIR})
- include_directories(${GIO_INCLUDE_DIR})
- include_directories(${GOBJECT_INCLUDE_DIR})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
- if (${IBUS_VERSION} VERSION_LESS "1.5.0")
- set(kimpanel_ibus_panel_SRCS ibus14/panel.c ibus14/main.c)
- add_executable(kimpanel-ibus-panel ${kimpanel_ibus_panel_SRCS})
- target_link_libraries(kimpanel-ibus-panel ${IBUS_LIBRARIES} ${GLIB2_LIBRARIES} ${GIO_LIBRARIES} ${GOBJECT_LIBRARIES})
- else()
- set(kimpanel_ibus_panel_SRCS
- ibus15/xkblayoutmanager.cpp
- ibus15/gtkaccelparse_p.c
- ibus15/gdkkeynames_p.c
- ibus15/app.cpp
- ibus15/enginemanager.cpp
- ibus15/main.cpp
- ibus15/panel.cpp
- ibus15/propertymanager.cpp)
- add_definitions(-DQT_NO_KEYWORDS)
- add_executable(kimpanel-ibus-panel ${kimpanel_ibus_panel_SRCS})
- target_link_libraries(kimpanel-ibus-panel ${IBUS_LIBRARIES} ${GLIB2_LIBRARIES} ${GIO_LIBRARIES} ${GOBJECT_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${X11_X11_LIB} ${QT_QTGUI_LIBRARY})
- endif()
- install(TARGETS kimpanel-ibus-panel DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kimpanel.xml.in ${CMAKE_CURRENT_BINARY_DIR}/kimpanel.xml @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kimpanel.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ibus/component)
-endif(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND)
+include_directories(${IBUS_INCLUDE_DIR})
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+
+if (${IBUS_VERSION} VERSION_LESS "1.5.0")
+ set(kimpanel_ibus_panel_SRCS ibus14/panel.c ibus14/main.c)
+ add_executable(kimpanel-ibus-panel ${kimpanel_ibus_panel_SRCS})
+ target_link_libraries(kimpanel-ibus-panel ${IBUS_LIBRARIES})
+else()
+ set(kimpanel_ibus_panel_SRCS
+ ibus15/xkblayoutmanager.cpp
+ ibus15/gtkaccelparse_p.c
+ ibus15/gdkkeynames_p.c
+ ibus15/app.cpp
+ ibus15/enginemanager.cpp
+ ibus15/main.cpp
+ ibus15/panel.cpp
+ ibus15/propertymanager.cpp)
+ add_definitions(-DQT_NO_KEYWORDS)
+
+ add_executable(kimpanel-ibus-panel ${kimpanel_ibus_panel_SRCS})
+ target_link_libraries(kimpanel-ibus-panel ${IBUS_LIBRARIES}
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTDBUS_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${X11_X11_LIB}
+ )
+endif()
+
+install(TARGETS kimpanel-ibus-panel DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kimpanel.xml.in ${CMAKE_CURRENT_BINARY_DIR}/kimpanel.xml @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kimpanel.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ibus/component)
-find_package(SCIM)
-if(SCIM_FOUND)
- include_directories(${SCIM_INCLUDE_DIR})
- set(SCIM_ICON_DIR "${PC_SCIM_PREFIX}/share/scim/icons")
- configure_file(config-scim.h.cmake config-scim.h)
- set(kimpanel_scim_panel_SRCS main.cpp)
- add_executable(kimpanel-scim-panel ${kimpanel_scim_panel_SRCS})
- target_link_libraries(kimpanel-scim-panel ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${SCIM_LIBRARIES})
- install(TARGETS kimpanel-scim-panel DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
-endif(SCIM_FOUND)
+include_directories(${SCIM_INCLUDE_DIR})
+
+set(SCIM_ICON_DIR "${PC_SCIM_PREFIX}/share/scim/icons")
+configure_file(config-scim.h.cmake config-scim.h)
+
+set(kimpanel_scim_panel_SRCS main.cpp)
+add_executable(kimpanel-scim-panel ${kimpanel_scim_panel_SRCS})
+target_link_libraries(kimpanel-scim-panel
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTDBUS_LIBRARY}
+ ${SCIM_LIBRARIES}
+)
+
+install(TARGETS kimpanel-scim-panel DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
+++ /dev/null
-# - Try to find the SCIM
-# Once done this will define
-#
-# SCIM_FOUND - system has SCIM
-# SCIM_INCLUDE_DIR - The include directory to use for the SCIM headers
-# SCIM_LIBRARIES - Link these to use SCIM
-# SCIM_DEFINITIONS - Compiler switches required for using SCIM
-
-# Copyright (c) 2009 Wang Hoi, <zeahot.hoi@gmail.org>
-# Based on Laurent Montel's FindFontConfig.cmake, <montel@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-if (SCIM_LIBRARIES AND SCIM_INCLUDE_DIR)
-
- # in cache already
- set(SCIM_FOUND TRUE)
-
-else (SCIM_LIBRARIES AND SCIM_INCLUDE_DIR)
-
- if (NOT WIN32)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- find_package(PkgConfig)
- pkg_check_modules(PC_SCIM scim)
-
- set(SCIM_DEFINITIONS ${PC_SCIM_CFLAGS_OTHER})
- endif (NOT WIN32)
-
- find_path(SCIM_INCLUDE_DIR scim.h
- PATHS
- ${PC_SCIM_INCLUDEDIR}
- ${PC_SCIM_INCLUDE_DIRS}
- )
-
- find_library(SCIM_LIBRARIES NAMES scim scim-1.0
- PATHS
- ${PC_SCIM_LIBDIR}
- ${PC_SCIM_LIBRARY_DIRS}
- )
-
- include(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCIM DEFAULT_MSG SCIM_LIBRARIES SCIM_INCLUDE_DIR )
-
- mark_as_advanced(SCIM_LIBRARIES SCIM_INCLUDE_DIR)
-
-endif (SCIM_LIBRARIES AND SCIM_INCLUDE_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.
+++ /dev/null
-# - Try to find the GIO libraries
-# Once done this will define
-#
-# GIO_FOUND - system has GIO
-# GIO_INCLUDE_DIR - the GIO include directory
-# GIO_LIBRARIES - GIO library
-#
-# Copyright (c) 2010 Dario Freddi <drf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-if(GIO_INCLUDE_DIR AND GIO_LIBRARIES)
- # Already in cache, be silent
- set(GIO_FIND_QUIETLY TRUE)
-endif(GIO_INCLUDE_DIR AND GIO_LIBRARIES)
-
-find_package(PkgConfig)
-pkg_check_modules(PC_LibGIO QUIET gio-2.0)
-
-find_path(GIO_MAIN_INCLUDE_DIR
- NAMES glib.h
- HINTS ${PC_LibGIO_INCLUDEDIR}
- PATH_SUFFIXES glib-2.0)
-
-find_library(GIO_LIBRARIES
- NAMES gio-2.0
- HINTS ${PC_LibGLIB2_LIBDIR})
-
-
-get_filename_component(GIOLibDir "${GIO_LIBRARIES}" PATH)
-
-find_path(GIO_INTERNAL_INCLUDE_DIR glibconfig.h
- PATH_SUFFIXES glib-2.0/include
- PATHS ${_LibGIOIncDir} "${GIOLibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}
- NO_DEFAULT_PATH)
-
-find_path(GIO_INTERNAL_INCLUDE_DIR glibconfig.h
- PATH_SUFFIXES glib-2.0/include
- PATHS ${_LibGIOIncDir} "${GIOLibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
-
-set(GIO_INCLUDE_DIR "${GIO_MAIN_INCLUDE_DIR}")
-
-# not sure if this include dir is optional or required
-# for now it is optional
-if(GIO_INTERNAL_INCLUDE_DIR)
- set(GIO_INCLUDE_DIR ${GIO_INCLUDE_DIR} "${GIO_INTERNAL_INCLUDE_DIR}")
-endif(GIO_INTERNAL_INCLUDE_DIR)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GIO DEFAULT_MSG GIO_LIBRARIES GIO_MAIN_INCLUDE_DIR)
-
-mark_as_advanced(GIO_INCLUDE_DIR GIO_LIBRARIES)
+++ /dev/null
-# - Try to find IBUS
-# Once done this will define
-#
-# IBUS_FOUND - system has IBUS
-# IBUS_INCLUDE_DIR - The include directory to use for the fontconfig headers
-# IBUS_LIBRARIES - Link these to use IBUS
-# IBUS_DEFINITIONS - Compiler switches required for using IBUS
-
-# Copyright (c) 2011 Ni Hui, <shuizhuyuanluo@126.com>
-# Based on Laurent Montel's FindFontConfig.cmake, <montel@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-if (IBUS_LIBRARIES AND IBUS_INCLUDE_DIR AND IBUS_VERSION)
-
- # in cache already
- set(IBUS_FOUND TRUE)
-
-else ()
-
- if (NOT WIN32)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- find_package(PkgConfig)
- pkg_check_modules(PC_IBUS "ibus-1.0>=1.4.2")
-
- set(IBUS_DEFINITIONS ${PC_IBUS_CFLAGS_OTHER})
- endif (NOT WIN32)
-
- if (PC_IBUS_FOUND)
-
- find_path(IBUS_INCLUDE_DIR ibus.h
- PREFIX ibus-1.0
- PATHS
- ${PC_IBUS_INCLUDEDIR}
- ${PC_IBUS_INCLUDE_DIRS}
- )
-
- find_library(IBUS_LIBRARIES NAMES ibus-1.0 ibus
- PATHS
- ${PC_IBUS_LIBDIR}
- ${PC_IBUS_LIBRARY_DIRS}
- )
- endif (PC_IBUS_FOUND)
-
- set(IBUS_VERSION ${PC_IBUS_VERSION})
- set(IBUS_FOUND ${PC_IBUS_FOUND})
-
- include(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(IBUS
- FOUND_VAR IBUS_FOUND
- REQUIRED_VARS IBUS_LIBRARIES IBUS_INCLUDE_DIR
- VERSION_VAR IBUS_VERSION)
-
- mark_as_advanced(IBUS_LIBRARIES IBUS_INCLUDE_DIR IBUS_VERSION)
-
-endif ()
+++ /dev/null
-# - Try to find the SCIM
-# Once done this will define
-#
-# SCIM_FOUND - system has Fontconfig
-# SCIM_INCLUDE_DIR - The include directory to use for the fontconfig headers
-# SCIM_LIBRARIES - Link these to use SCIM
-# SCIM_DEFINITIONS - Compiler switches required for using SCIM
-
-# Copyright (c) 2009 Wang Hoi, <zeahot.hoi@gmail.org>
-# Based on Laurent Montel's FindFontConfig.cmake, <montel@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-if (SCIM_LIBRARIES AND SCIM_INCLUDE_DIR)
-
- # in cache already
- set(SCIM_FOUND TRUE)
-
-else (SCIM_LIBRARIES AND SCIM_INCLUDE_DIR)
-
- if (NOT WIN32)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- find_package(PkgConfig)
- pkg_check_modules(PC_SCIM scim)
-
- set(SCIM_DEFINITIONS ${PC_SCIM_CFLAGS_OTHER})
- endif (NOT WIN32)
-
- find_path(SCIM_INCLUDE_DIR scim.h
- PATHS
- ${PC_SCIM_INCLUDEDIR}
- ${PC_SCIM_INCLUDE_DIRS}
- )
-
- find_library(SCIM_LIBRARIES NAMES scim scim-1.0
- PATHS
- ${PC_SCIM_LIBDIR}
- ${PC_SCIM_LIBRARY_DIRS}
- )
-
- include(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCIM DEFAULT_MSG SCIM_LIBRARIES SCIM_INCLUDE_DIR )
-
- mark_as_advanced(SCIM_LIBRARIES SCIM_INCLUDE_DIR)
-
-endif (SCIM_LIBRARIES AND SCIM_INCLUDE_DIR)
+++ /dev/null
-# no tests now