1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

Add Support for gtk2 interface with cmake build system

This commit is contained in:
Julien Louis
2007-08-18 17:17:54 +00:00
parent 0c0e511079
commit fb8bae3c78
6 changed files with 92 additions and 2 deletions
+1
View File
@@ -32,6 +32,7 @@ SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
OPTION(DISABLE_NCURSES "Disable Ncurses interface")
OPTION(ENABLE_GTK "Enable GTK interface")
OPTION(DISABLE_NLS "Disable Native Language Support")
OPTION(DISABLE_GNUTLS "Disable SSLv3/TLS connection support")
OPTION(DISABLE_PLUGINS "Disable Plugins support")
+7 -1
View File
@@ -14,7 +14,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SUBDIRS( curses )
IF(NOT DISABLE_NCURSES)
SUBDIRS( curses )
ENDIF(NOT DISABLE_NCURSES)
SET(LIB_GUI_COMMON_SRC gui-buffer.c gui-common.c gui-action.c gui-keyboard.c
gui-log.c gui-window.c gui-panel.c gui.h gui-buffer.h gui-color.h gui-keyboard.h
@@ -22,3 +24,7 @@ gui-panel.h gui-window.h)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
IF(ENABLE_GTK)
ADD_SUBDIRECTORY( gtk )
ENDIF(ENABLE_GTK)
+38
View File
@@ -0,0 +1,38 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SET(WEECHAT_GTK_SRC gui-gtk-chat.c gui-gtk-color.c gui-gtk-infobar.c
gui-gtk-input.c gui-gtk-keyboard.c gui-gtk-main.c gui-gtk-nicklist.c
gui-gtk-status.c gui-gtk-window.c gui-gtk-panel.c gui-gtk.h)
SET(EXECUTABLE weechat-gtk)
FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND)
pkg_check_modules(GTK2 gtk+-x11-2.0)
IF(GTK2_FOUND)
INCLUDE_DIRECTORIES( ${GTK2_INCLUDE_DIRS} )
LIST(APPEND EXTRA_LIBS ${GTK2_LIBRARIES})
# ELSE(GTK2_FOUND)
# MESSAGE(FATAL_ERROR "Missing dependency, aborting configuration phase")
ENDIF(GTK2_FOUND)
ENDIF(PKG_CONFIG_FOUND)
ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_GTK_SRC})
INCLUDE_DIRECTORIES(.. ../../common ../../irc ../../plugins)
TARGET_LINK_LIBRARIES(${EXECUTABLE} ${STATIC_LIBS} ${EXTRA_LIBS})
INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
+1
View File
@@ -32,6 +32,7 @@ SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
OPTION(DISABLE_NCURSES "Disable Ncurses interface")
OPTION(ENABLE_GTK "Enable GTK interface")
OPTION(DISABLE_NLS "Disable Native Language Support")
OPTION(DISABLE_GNUTLS "Disable SSLv3/TLS connection support")
OPTION(DISABLE_PLUGINS "Disable Plugins support")
+7 -1
View File
@@ -14,7 +14,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SUBDIRS( curses )
IF(NOT DISABLE_NCURSES)
SUBDIRS( curses )
ENDIF(NOT DISABLE_NCURSES)
SET(LIB_GUI_COMMON_SRC gui-buffer.c gui-common.c gui-action.c gui-keyboard.c
gui-log.c gui-window.c gui-panel.c gui.h gui-buffer.h gui-color.h gui-keyboard.h
@@ -22,3 +24,7 @@ gui-panel.h gui-window.h)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
IF(ENABLE_GTK)
ADD_SUBDIRECTORY( gtk )
ENDIF(ENABLE_GTK)
+38
View File
@@ -0,0 +1,38 @@
# Copyright (c) 2003-2007 FlashCode <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SET(WEECHAT_GTK_SRC gui-gtk-chat.c gui-gtk-color.c gui-gtk-infobar.c
gui-gtk-input.c gui-gtk-keyboard.c gui-gtk-main.c gui-gtk-nicklist.c
gui-gtk-status.c gui-gtk-window.c gui-gtk-panel.c gui-gtk.h)
SET(EXECUTABLE weechat-gtk)
FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND)
pkg_check_modules(GTK2 gtk+-x11-2.0)
IF(GTK2_FOUND)
INCLUDE_DIRECTORIES( ${GTK2_INCLUDE_DIRS} )
LIST(APPEND EXTRA_LIBS ${GTK2_LIBRARIES})
# ELSE(GTK2_FOUND)
# MESSAGE(FATAL_ERROR "Missing dependency, aborting configuration phase")
ENDIF(GTK2_FOUND)
ENDIF(PKG_CONFIG_FOUND)
ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_GTK_SRC})
INCLUDE_DIRECTORIES(.. ../../common ../../irc ../../plugins)
TARGET_LINK_LIBRARIES(${EXECUTABLE} ${STATIC_LIBS} ${EXTRA_LIBS})
INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)