Make CMake install plugin locally.

This commit is contained in:
Håvard Pettersson 2014-09-02 21:14:05 +02:00
parent d9c5321272
commit cbf8895c9e
2 changed files with 3 additions and 8 deletions

View File

@ -13,15 +13,9 @@ add_library(tox SHARED
src/tox-weechat-friend-requests.c src/tox-weechat-friend-requests.c
) )
if (PREFIX)
set(CMAKE_INSTALL_PREFIX ${PREFIX})
else()
set(CMAKE_INSTALL_PREFIX /usr/local/lib/weechat)
endif()
# remove lib prefix # remove lib prefix
set_target_properties(tox PROPERTIES PREFIX "") set_target_properties(tox PROPERTIES PREFIX "")
target_link_libraries(tox toxcore) target_link_libraries(tox toxcore)
install(FILES build/tox.so DESTINATION plugins) install(FILES build/tox.so DESTINATION ~/.weechat/plugins)

View File

@ -16,7 +16,7 @@ Tox-WeeChat requires [libtoxcore][3] to work. After getting it, install Tox-WeeC
$ cmake .. $ cmake ..
$ make install $ make install
This places `tox.so` in `/usr/local/lib/weechat/plugins`. If you don't have root access or otherwise would like to install it locally, replace the cmake command above with this one: `cmake -DPREFIX=$HOME/.weechat ..`. This places `tox.so` in `~/.weechat/plugins`.
Usage Usage
----- -----
@ -40,3 +40,4 @@ Copyright (c) 2014 Håvard Pettersson <haavard.pettersson@gmail.com>.
[1]: http://weechat.org [1]: http://weechat.org
[2]: http://tox.im [2]: http://tox.im
[3]: https://github.com/irungentoo/toxcore [3]: https://github.com/irungentoo/toxcore