aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt32
-rw-r--r--README.adoc10
-rw-r--r--xC.adoc2
-rw-r--r--xF.adoc34
4 files changed, 68 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2263af0..9afcdf4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,6 +176,7 @@ add_custom_command (OUTPUT xC-proto.c
add_custom_target (xC-proto DEPENDS ${PROJECT_BINARY_DIR}/xC-proto.c)
# Build
+set (project_binaries xB xC xD)
foreach (name xB xC xD)
add_executable (${name} ${name}.c ${project_config})
target_link_libraries (${name} ${project_libraries})
@@ -187,12 +188,13 @@ add_dependencies (xC replies xC-proto)
target_link_libraries (xC ${xC_libraries})
if (WANT_XF)
- pkg_check_modules (x11 REQUIRED x11 xrender xft fontconfig)
- include_directories (${x11_INCLUDE_DIRS})
- link_directories (${x11_LIBRARY_DIRS})
+ list (APPEND project_binaries xF)
+ pkg_check_modules (x11 REQUIRED x11 xrender xft fontconfig libpng)
add_executable (xF xF.c ${project_config})
add_dependencies (xF xC-proto)
+ target_include_directories (xF PRIVATE ${x11_INCLUDE_DIRS})
+ target_link_directories (xF PRIVATE ${x11_LIBRARY_DIRS})
target_link_libraries (xF ${x11_LIBRARIES} ${project_libraries})
add_threads (xF)
endif ()
@@ -226,13 +228,33 @@ add_custom_target (clang-tidy
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
# Installation
-install (TARGETS xB xC xD DESTINATION ${CMAKE_INSTALL_BINDIR})
+install (TARGETS ${project_binaries} DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
install (DIRECTORY plugins/xB/
DESTINATION ${CMAKE_INSTALL_DATADIR}/xB/plugins USE_SOURCE_PERMISSIONS)
install (DIRECTORY plugins/xC/
DESTINATION ${CMAKE_INSTALL_DATADIR}/xC/plugins)
+# Rasterize and install SVG icons
+if (WANT_XF)
+ include (IconUtils)
+
+ set (icon_base ${PROJECT_BINARY_DIR}/icons)
+ set (icon_png_list)
+ foreach (icon_size 16 32 48)
+ icon_to_png (xF ${PROJECT_SOURCE_DIR}/xF.svg
+ ${icon_size} ${icon_base} icon_png)
+ list (APPEND icon_png_list ${icon_png})
+ endforeach ()
+
+ add_custom_target (icons ALL DEPENDS ${icon_png_list})
+
+ install (FILES xF.svg
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps)
+ install (DIRECTORY ${icon_base}
+ DESTINATION ${CMAKE_INSTALL_DATADIR})
+endif ()
+
# Generate documentation from text markup
find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor)
find_program (A2X_EXECUTABLE a2x)
@@ -241,7 +263,7 @@ if (NOT ASCIIDOCTOR_EXECUTABLE AND NOT A2X_EXECUTABLE)
"falling back to a substandard manual page generator")
endif ()
-foreach (page xB xC xD)
+foreach (page ${project_binaries})
set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
list (APPEND project_MAN_PAGES "${page_output}")
if (ASCIIDOCTOR_EXECUTABLE)
diff --git a/README.adoc b/README.adoc
index eae2c82..172224a 100644
--- a/README.adoc
+++ b/README.adoc
@@ -33,8 +33,9 @@ including link:xC.adoc#_key_bindings[keyboard shortcuts].
image::xP.webp[align="center"]
-xA, xW, xM
-----------
+<<<<<<< HEAD
+xA, xF, xW, xM
+--------------
The native frontends for 'xC'. Using them is not recommended.
xD
@@ -85,16 +86,17 @@ or as a https://git.janouch.name/p/nixexprs[Nix derivation].
Building
--------
Build-only dependencies: CMake, pkg-config, awk, liberty (included),
- asciidoctor or asciidoc (recommended but optional) +
+ asciidoctor or asciidoc (recommended but optional), rsvg-convert (for 'xF') +
Common runtime dependencies: openssl +
Additionally for 'xC': curses, libffi, readline >= 6.0 or libedit >= 2013-07-12,
lua >= 5.3 (optional) +
+Additionally for 'xF': x11, xrender, xft, fontconfig, libpng
$ git clone --recursive https://git.janouch.name/p/xK.git
$ mkdir xK/build
$ cd xK/build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWITH_LUA=ON
+ -DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWITH_LUA=ON -DWITH_XF=OFF
$ make
To install the application, you can do either the usual:
diff --git a/xC.adoc b/xC.adoc
index e2ef827..ec134d0 100644
--- a/xC.adoc
+++ b/xC.adoc
@@ -124,4 +124,4 @@ or submit pull requests.
See also
--------
-*less*(1), *readline*(3) or *editline*(7)
+*less*(1), *readline*(3) or *editline*(7), *xF*(1)
diff --git a/xF.adoc b/xF.adoc
new file mode 100644
index 0000000..75609bf
--- /dev/null
+++ b/xF.adoc
@@ -0,0 +1,34 @@
+xF(1)
+=====
+:doctype: manpage
+:manmanual: xK Manual
+:mansource: xK {release-version}
+
+Name
+----
+xF - X11 frontend for xC
+
+Synopsis
+--------
+*xF* [_OPTION_]... RELAY-ADDRESS
+
+Description
+-----------
+*xF* is an X11 frontend for the relay interface of the *xC* IRC client.
+
+Options
+-------
+*-h*, *--help*::
+ Display a help message and exit.
+
+*-V*, *--version*::
+ Output version information and exit.
+
+Reporting bugs
+--------------
+Use https://git.janouch.name/p/xK to report bugs, request features,
+or submit pull requests.
+
+See also
+--------
+*xC*(1)