Simplified CMake flags.
This commit is contained in:
parent
a00e0f311f
commit
dba3e386b0
@ -21,15 +21,7 @@ cmake_minimum_required(VERSION 2.8.7)
|
|||||||
|
|
||||||
project(tox-weechat C)
|
project(tox-weechat C)
|
||||||
|
|
||||||
option(HOME_FOLDER_INSTALL "Install to ~/.weechat/plugins instead of default location." OFF)
|
set(PLUGIN_PATH "lib/weechat/plugins" CACHE PATH "Path to install the plugin binary to.")
|
||||||
if(HOME_FOLDER_INSTALL)
|
|
||||||
set(INSTALL_PATH "~/.weechat/plugins")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED INSTALL_PATH OR "${INSTALL_PATH}" STREQUAL "")
|
|
||||||
set(INSTALL_PATH "lib/weechat/plugins")
|
|
||||||
endif()
|
|
||||||
set(INSTALL_PATH "${INSTALL_PATH}" CACHE PATH "Path to install the plugin binary to.")
|
|
||||||
|
|
||||||
add_library(tox MODULE
|
add_library(tox MODULE
|
||||||
src/twc.c
|
src/twc.c
|
||||||
@ -57,5 +49,5 @@ target_link_libraries(tox sqlite3)
|
|||||||
# remove lib prefix (libtox.so -> tox.so)
|
# remove lib prefix (libtox.so -> tox.so)
|
||||||
set_target_properties(tox PROPERTIES PREFIX "")
|
set_target_properties(tox PROPERTIES PREFIX "")
|
||||||
|
|
||||||
install(TARGETS tox DESTINATION "${INSTALL_PATH}")
|
install(TARGETS tox DESTINATION "${PLUGIN_PATH}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user