2014-09-18 16:55:52 +00:00
|
|
|
#
|
2017-02-04 00:00:25 +00:00
|
|
|
# Copyright (c) 2017 Håvard Pettersson <mail@haavard.me>.
|
2014-09-18 16:55:52 +00:00
|
|
|
#
|
|
|
|
# This file is part of Tox-WeeChat.
|
|
|
|
#
|
|
|
|
# Tox-WeeChat 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.
|
|
|
|
#
|
|
|
|
# Tox-WeeChat 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 Tox-WeeChat. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2015-09-02 21:05:45 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8.11)
|
2014-09-02 10:37:00 +00:00
|
|
|
|
2014-09-10 00:45:12 +00:00
|
|
|
project(tox-weechat C)
|
|
|
|
|
2015-01-30 13:54:25 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
|
2015-09-02 20:34:10 +00:00
|
|
|
|
|
|
|
find_package(WeeChat REQUIRED)
|
|
|
|
find_package(Tox REQUIRED
|
|
|
|
COMPONENTS CORE
|
2015-09-07 17:44:17 +00:00
|
|
|
OPTIONAL_COMPONENTS AV ENCRYPTSAVE)
|
2015-01-30 13:54:25 +00:00
|
|
|
|
2014-11-19 06:12:41 +00:00
|
|
|
set(PLUGIN_PATH "lib/weechat/plugins" CACHE PATH
|
|
|
|
"Path to install the plugin binary to.")
|
2014-09-02 10:37:00 +00:00
|
|
|
|
2014-09-08 01:22:51 +00:00
|
|
|
add_library(tox MODULE
|
2014-09-28 01:29:34 +00:00
|
|
|
src/twc.c
|
|
|
|
src/twc-bootstrap.c
|
|
|
|
src/twc-chat.c
|
|
|
|
src/twc-commands.c
|
|
|
|
src/twc-completion.c
|
|
|
|
src/twc-config.c
|
|
|
|
src/twc-friend-request.c
|
|
|
|
src/twc-gui.c
|
2014-10-04 19:42:30 +00:00
|
|
|
src/twc-group-invite.c
|
2014-09-28 01:29:34 +00:00
|
|
|
src/twc-list.c
|
|
|
|
src/twc-message-queue.c
|
|
|
|
src/twc-profile.c
|
|
|
|
src/twc-tox-callbacks.c
|
|
|
|
src/twc-utils.c
|
2014-09-02 10:37:00 +00:00
|
|
|
)
|
2014-09-10 00:45:12 +00:00
|
|
|
|
2014-11-20 10:17:16 +00:00
|
|
|
set(CMAKE_C_FLAGS_DEBUG "-DTWC_DEBUG")
|
2014-11-19 11:03:06 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra -Wno-unused-parameter")
|
2014-09-08 00:59:50 +00:00
|
|
|
|
2015-09-02 20:34:10 +00:00
|
|
|
include_directories(${Tox_INCLUDE_DIRS})
|
|
|
|
include_directories(${WeeChat_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
target_link_libraries(tox ${Tox_LIBRARIES})
|
2015-01-30 13:54:25 +00:00
|
|
|
|
2015-09-02 20:34:10 +00:00
|
|
|
if(Tox_AV_FOUND)
|
|
|
|
add_definitions(-DTOXAV_ENABLED)
|
|
|
|
endif()
|
2014-09-08 01:28:15 +00:00
|
|
|
|
2015-09-07 17:44:17 +00:00
|
|
|
if(Tox_ENCRYPTSAVE_FOUND)
|
|
|
|
add_definitions(-DTOXENCRYPTSAVE_ENABLED)
|
|
|
|
endif()
|
|
|
|
|
2014-09-07 22:22:49 +00:00
|
|
|
# remove lib prefix (libtox.so -> tox.so)
|
2014-09-02 10:37:00 +00:00
|
|
|
set_target_properties(tox PROPERTIES PREFIX "")
|
|
|
|
|
2014-10-11 11:11:47 +00:00
|
|
|
install(TARGETS tox DESTINATION "${PLUGIN_PATH}")
|
2014-09-10 00:45:12 +00:00
|
|
|
|