Commit a240ce9e authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

ibus: cmake cleanup

Improve scope of variables on CMake.
Remove unnecessary statements
parent c87a26dc
...@@ -4,21 +4,20 @@ find_package(GIO) ...@@ -4,21 +4,20 @@ find_package(GIO)
find_package(GObject) find_package(GObject)
if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND) if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND)
configure_file(config-kimpanel.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kimpanel.h) include_directories(${IBUS_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR})
include_directories(${IBUS_INCLUDE_DIR}) add_subdirectory(emojier)
include_directories(${GIO_INCLUDE_DIR})
include_directories(${GOBJECT_INCLUDE_DIR})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
configure_file(config-kimpanel.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kimpanel.h)
find_package(Qt5X11Extras) find_package(Qt5X11Extras)
find_package(XCB COMPONENTS XCB KEYSYMS) find_package(XCB COMPONENTS XCB KEYSYMS)
add_subdirectory(emojier)
if (Qt5X11Extras_FOUND AND XCB_XCB_FOUND AND XCB_KEYSYMS_FOUND) if (Qt5X11Extras_FOUND AND XCB_XCB_FOUND AND XCB_KEYSYMS_FOUND)
include_directories(${GIO_INCLUDE_DIR})
include_directories(${GOBJECT_INCLUDE_DIR})
include_directories(${XCB_XCB_INCLUDE_DIRS}) include_directories(${XCB_XCB_INCLUDE_DIRS})
include_directories(${XCB_KEYSYMS_INCLUDE_DIRS}) include_directories(${XCB_KEYSYMS_INCLUDE_DIRS})
set(kimpanel_ibus_panel_SRCS set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
add_executable(kimpanel-ibus-panel
ibus15/xkblayoutmanager.cpp ibus15/xkblayoutmanager.cpp
ibus15/gtkaccelparse_p.c ibus15/gtkaccelparse_p.c
ibus15/gdkkeynames_p.c ibus15/gdkkeynames_p.c
...@@ -27,8 +26,7 @@ if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND) ...@@ -27,8 +26,7 @@ if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND)
ibus15/main.cpp ibus15/main.cpp
ibus15/panel.cpp ibus15/panel.cpp
ibus15/propertymanager.cpp) ibus15/propertymanager.cpp)
add_definitions(-DQT_NO_KEYWORDS) target_compile_definitions(kimpanel-ibus-panel PRIVATE -DQT_NO_KEYWORDS)
add_executable(kimpanel-ibus-panel ${kimpanel_ibus_panel_SRCS})
target_link_libraries(kimpanel-ibus-panel ${IBUS_LIBRARIES} GLIB2::GLIB2 ${GIO_LIBRARIES} ${GOBJECT_LIBRARIES} Qt5::Core Qt5::DBus Qt5::Gui Qt5::X11Extras XCB::KEYSYMS) target_link_libraries(kimpanel-ibus-panel ${IBUS_LIBRARIES} GLIB2::GLIB2 ${GIO_LIBRARIES} ${GOBJECT_LIBRARIES} Qt5::Core Qt5::DBus Qt5::Gui Qt5::X11Extras XCB::KEYSYMS)
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kimpanel.xml.in ${CMAKE_CURRENT_BINARY_DIR}/kimpanel.xml @ONLY) # 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) # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kimpanel.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ibus/component)
...@@ -36,9 +34,7 @@ if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND) ...@@ -36,9 +34,7 @@ if(IBUS_FOUND AND GLIB2_FOUND AND GIO_FOUND AND GOBJECT_FOUND)
target_include_directories(kimpanel-ibus-panel PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(kimpanel-ibus-panel PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_executable(kimpanel-ibus-panel-launcher launcher.cpp) add_executable(kimpanel-ibus-panel-launcher launcher.cpp)
set_target_properties(kimpanel-ibus-panel-launcher PROPERTIES AUTOMOC TRUE)
target_link_libraries(kimpanel-ibus-panel-launcher Qt5::Core Qt5::DBus) target_link_libraries(kimpanel-ibus-panel-launcher Qt5::Core Qt5::DBus)
target_include_directories(kimpanel-ibus-panel-launcher PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
install(TARGETS kimpanel-ibus-panel kimpanel-ibus-panel-launcher DESTINATION ${KDE_INSTALL_LIBEXECDIR}) install(TARGETS kimpanel-ibus-panel kimpanel-ibus-panel-launcher DESTINATION ${KDE_INSTALL_LIBEXECDIR})
endif() endif()
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment