diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-01 08:21:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 08:21:01 -0500 |
commit | 1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254 (patch) | |
tree | b74002984ff80201c02ed9c22ca2fe1cdae98e23 | |
parent | Merge pull request #1482 from acrisci/refactor/use-frame-done (diff) | |
parent | update travis (diff) | |
download | sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.tar.gz sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.tar.zst sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.zip |
Merge pull request #1479 from acrisci/feature/meson-build
meson build
48 files changed, 266 insertions, 1603 deletions
@@ -1,7 +1,7 @@ | |||
1 | # vim: ft=yaml ts=2 sw=2 et : | 1 | # vim: ft=yaml ts=2 sw=2 et : |
2 | image: archlinux | 2 | image: archlinux |
3 | packages: | 3 | packages: |
4 | - cmake | 4 | - meson |
5 | - wlc-git | 5 | - wlc-git |
6 | - xorg-server-xwayland | 6 | - xorg-server-xwayland |
7 | - xcb-util-image | 7 | - xcb-util-image |
@@ -9,25 +9,22 @@ packages: | |||
9 | - pango | 9 | - pango |
10 | - cairo | 10 | - cairo |
11 | - wayland | 11 | - wayland |
12 | - wayland-protocols | ||
12 | - gdk-pixbuf2 | 13 | - gdk-pixbuf2 |
13 | - meson | 14 | - libinput |
15 | - libxkbcommon | ||
14 | sources: | 16 | sources: |
15 | - https://git.sr.ht/~sircmpwn/sway | 17 | - https://git.sr.ht/~sircmpwn/sway |
16 | - https://git.sr.ht/~sircmpwn/wlroots | 18 | - https://git.sr.ht/~sircmpwn/wlroots |
17 | tasks: | 19 | tasks: |
18 | - wlroots: | | 20 | - wlroots: | |
19 | cd wlroots | 21 | cd wlroots |
20 | mkdir build | 22 | meson --prefix=/usr build |
21 | cd build | 23 | ninja -C build |
22 | meson --prefix=/usr .. | 24 | sudo ninja -C build install |
23 | ninja | ||
24 | sudo ninja install | ||
25 | - setup: | | 25 | - setup: | |
26 | cd sway | 26 | cd sway |
27 | mkdir build | 27 | meson build |
28 | cd build | ||
29 | cmake .. | ||
30 | - build: | | 28 | - build: | |
31 | cd sway | 29 | cd sway |
32 | cd build | 30 | ninja -C build |
33 | make | ||
@@ -1,7 +1,3 @@ | |||
1 | CMakeCache.txt | ||
2 | CMakeFiles | ||
3 | Makefile | ||
4 | cmake_install.cmake | ||
5 | install_manifest.txt | 1 | install_manifest.txt |
6 | *.swp | 2 | *.swp |
7 | *.o | 3 | *.o |
diff --git a/.travis.yml b/.travis.yml index bc1ee45b..db717718 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -7,35 +7,29 @@ compiler: | |||
7 | - clang | 7 | - clang |
8 | 8 | ||
9 | env: | 9 | env: |
10 | - BUILD_TYPE=Release | 10 | - BUILD_TYPE=release |
11 | - BUILD_TYPE=Debug | 11 | - BUILD_TYPE=debug |
12 | - BUILD_TYPE=ASAN | ||
13 | 12 | ||
14 | arch: | 13 | arch: |
15 | packages: | 14 | packages: |
16 | - cmake | 15 | - meson |
16 | - ninja | ||
17 | - xorg-server-xwayland | 17 | - xorg-server-xwayland |
18 | - json-c | 18 | - json-c |
19 | - wayland | 19 | - wayland |
20 | - wayland-protocols | ||
20 | - xcb-util-image | 21 | - xcb-util-image |
21 | - pango | 22 | - pango |
22 | - cairo | 23 | - cairo |
23 | - gdk-pixbuf2 | 24 | - gdk-pixbuf2 |
24 | - wlc-git | ||
25 | - libcap | 25 | - libcap |
26 | - meson | 26 | - libinput |
27 | - libxkbcommon | ||
27 | script: | 28 | script: |
28 | - git clone https://github.com/swaywm/wlroots | 29 | - git clone https://github.com/swaywm/wlroots |
29 | - cd wlroots | 30 | - 'cd wlroots && meson --prefix=/usr build && ninja -C build && sudo ninja -C build install' |
30 | - mkdir build | 31 | - meson build --buildtype=$BUILD_TYPE |
31 | - cd build | 32 | - ninja -C build |
32 | - meson --prefix=/usr .. | ||
33 | - sudo ninja install | ||
34 | - cd ../.. | ||
35 | - cmake . | ||
36 | - make | ||
37 | - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . | ||
38 | - make | ||
39 | 33 | ||
40 | script: | 34 | script: |
41 | - "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash" | 35 | - "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash" |
diff --git a/CMake/FindA2X.cmake b/CMake/FindA2X.cmake deleted file mode 100644 index b38f5086..00000000 --- a/CMake/FindA2X.cmake +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | # | ||
2 | # (c)2015 KiCad Developers | ||
3 | # (c)2015 Brian Sidebotham <brian.sidebotham@gmail.com> | ||
4 | # | ||
5 | # CMake module to find a2x (part of the asciidoc toolchain). | ||
6 | # | ||
7 | # Variables generated: | ||
8 | # | ||
9 | # A2X_FOUND true when A2X_COMMAND is valid | ||
10 | # A2X_COMMAND The command to run a2x (may be a list including an interpreter) | ||
11 | # A2X_VERSION The a2x version that has been found | ||
12 | # | ||
13 | |||
14 | # Have a go at finding a a2x executable | ||
15 | find_program( A2X_PROGRAM a2x ) | ||
16 | |||
17 | # Found something, attempt to try and use it... | ||
18 | if( A2X_PROGRAM ) | ||
19 | execute_process( | ||
20 | COMMAND ${A2X_PROGRAM} --version | ||
21 | OUTPUT_VARIABLE _OUT | ||
22 | ERROR_VARIABLE _ERR | ||
23 | RESULT_VARIABLE _RES | ||
24 | OUTPUT_STRIP_TRAILING_WHITESPACE ) | ||
25 | |||
26 | # If it worked, set the A2X_COMMAND | ||
27 | if( _RES MATCHES 0 ) | ||
28 | set( A2X_COMMAND "${A2X_PROGRAM}" ) | ||
29 | endif() | ||
30 | endif() | ||
31 | |||
32 | # If nothing could be found, test to see if we can just find the script file, | ||
33 | # that we'll then run with the python interpreter | ||
34 | if( NOT A2X_COMMAND ) | ||
35 | find_file( A2X_SCRIPT a2x.py ) | ||
36 | |||
37 | if( A2X_SCRIPT ) | ||
38 | # Find the python interpreter quietly | ||
39 | if( NOT PYTHONINTERP_FOUND ) | ||
40 | find_package( PYTHONINTERP QUIET ) | ||
41 | endif() | ||
42 | |||
43 | if( NOT PYTHONINTERP_FOUND ) | ||
44 | # Python's not available so can't find a2x... | ||
45 | set( A2X_COMMAND "" ) | ||
46 | else() | ||
47 | # Build the python based command | ||
48 | set( A2X_COMMAND "${PYTHON_EXECUTABLE}" "${A2X_SCRIPT}" ) | ||
49 | |||
50 | execute_process( | ||
51 | COMMAND ${A2X_COMMAND} --version | ||
52 | OUTPUT_VARIABLE _OUT | ||
53 | ERROR_VARIABLE _ERR | ||
54 | RESULT_VARIABLE _RES | ||
55 | OUTPUT_STRIP_TRAILING_WHITESPACE ) | ||
56 | |||
57 | # If it still can't be run, then give up | ||
58 | if( NOT _RES MATCHES 0 ) | ||
59 | set( A2X_COMMAND "" ) | ||
60 | endif() | ||
61 | endif() | ||
62 | endif() | ||
63 | endif() | ||
64 | |||
65 | # If we've found a command that works, check the version | ||
66 | if( A2X_COMMAND ) | ||
67 | string(REGEX REPLACE ".*a2x[^0-9.]*\([0-9.]+\).*" "\\1" A2X_VERSION "${_OUT}") | ||
68 | endif() | ||
69 | |||
70 | # Generate the *_FOUND as necessary, etc. | ||
71 | include( FindPackageHandleStandardArgs ) | ||
72 | find_package_handle_standard_args( | ||
73 | A2X | ||
74 | REQUIRED_VARS A2X_COMMAND | ||
75 | VERSION_VAR A2X_VERSION ) | ||
diff --git a/CMake/FindCairo.cmake b/CMake/FindCairo.cmake deleted file mode 100644 index 10ab8fb0..00000000 --- a/CMake/FindCairo.cmake +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | # - Try to find the cairo library | ||
2 | # Once done this will define | ||
3 | # | ||
4 | # CAIRO_FOUND - system has cairo | ||
5 | # CAIRO_INCLUDE_DIRS - the cairo include directory | ||
6 | # CAIRO_LIBRARIES - Link these to use cairo | ||
7 | # | ||
8 | # Define CAIRO_MIN_VERSION for which version desired. | ||
9 | # | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | |||
13 | if(Cairo_FIND_REQUIRED) | ||
14 | set(_pkgconfig_REQUIRED "REQUIRED") | ||
15 | else(Cairo_FIND_REQUIRED) | ||
16 | set(_pkgconfig_REQUIRED "") | ||
17 | endif(Cairo_FIND_REQUIRED) | ||
18 | |||
19 | if(CAIRO_MIN_VERSION) | ||
20 | pkg_check_modules(CAIRO ${_pkgconfig_REQUIRED} cairo>=${CAIRO_MIN_VERSION}) | ||
21 | else(CAIRO_MIN_VERSION) | ||
22 | pkg_check_modules(CAIRO ${_pkgconfig_REQUIRED} cairo) | ||
23 | endif(CAIRO_MIN_VERSION) | ||
24 | |||
25 | if(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
26 | find_path(CAIRO_INCLUDE_DIRS cairo.h) | ||
27 | find_library(CAIRO_LIBRARIES cairo) | ||
28 | else(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
29 | # Make paths absolute https://stackoverflow.com/a/35476270 | ||
30 | # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path | ||
31 | set(CAIRO_LIBS_ABSOLUTE) | ||
32 | foreach(lib ${CAIRO_LIBRARIES}) | ||
33 | set(var_name CAIRO_${lib}_ABS) | ||
34 | find_library(${var_name} ${lib} ${CAIRO_LIBRARY_DIRS}) | ||
35 | list(APPEND CAIRO_LIBS_ABSOLUTE ${${var_name}}) | ||
36 | endforeach() | ||
37 | set(CAIRO_LIBRARIES ${CAIRO_LIBS_ABSOLUTE}) | ||
38 | endif(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
39 | |||
40 | include(FindPackageHandleStandardArgs) | ||
41 | find_package_handle_standard_args(CAIRO DEFAULT_MSG CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS) | ||
42 | mark_as_advanced(CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS) | ||
diff --git a/CMake/FindDBus.cmake b/CMake/FindDBus.cmake deleted file mode 100644 index 4a1a1805..00000000 --- a/CMake/FindDBus.cmake +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | # - Try to find DBus | ||
2 | # Once done, this will define | ||
3 | # | ||
4 | # DBUS_FOUND - system has DBus | ||
5 | # DBUS_INCLUDE_DIRS - the DBus include directories | ||
6 | # DBUS_LIBRARIES - link these to use DBus | ||
7 | # | ||
8 | # Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org> | ||
9 | # | ||
10 | # Redistribution and use in source and binary forms, with or without | ||
11 | # modification, are permitted provided that the following conditions | ||
12 | # are met: | ||
13 | # 1. Redistributions of source code must retain the above copyright | ||
14 | # notice, this list of conditions and the following disclaimer. | ||
15 | # 2. Redistributions in binary form must reproduce the above copyright | ||
16 | # notice, this list of conditions and the following disclaimer in the | ||
17 | # documentation and/or other materials provided with the distribution. | ||
18 | # | ||
19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS | ||
20 | # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
21 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
22 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS | ||
23 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
24 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
25 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
26 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
27 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
28 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
29 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
30 | |||
31 | FIND_PACKAGE(PkgConfig) | ||
32 | PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1) | ||
33 | |||
34 | FIND_LIBRARY(DBUS_LIBRARIES | ||
35 | NAMES dbus-1 | ||
36 | HINTS ${PC_DBUS_LIBDIR} | ||
37 | ${PC_DBUS_LIBRARY_DIRS} | ||
38 | ) | ||
39 | |||
40 | FIND_PATH(DBUS_INCLUDE_DIR | ||
41 | NAMES dbus/dbus.h | ||
42 | HINTS ${PC_DBUS_INCLUDEDIR} | ||
43 | ${PC_DBUS_INCLUDE_DIRS} | ||
44 | ) | ||
45 | |||
46 | GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH) | ||
47 | FIND_PATH(DBUS_ARCH_INCLUDE_DIR | ||
48 | NAMES dbus/dbus-arch-deps.h | ||
49 | HINTS ${PC_DBUS_INCLUDEDIR} | ||
50 | ${PC_DBUS_INCLUDE_DIRS} | ||
51 | ${_DBUS_LIBRARY_DIR} | ||
52 | ${DBUS_INCLUDE_DIR} | ||
53 | PATH_SUFFIXES include | ||
54 | ) | ||
55 | |||
56 | SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) | ||
57 | |||
58 | INCLUDE(FindPackageHandleStandardArgs) | ||
59 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES) | ||
diff --git a/CMake/FindEpollShim.cmake b/CMake/FindEpollShim.cmake deleted file mode 100644 index b6bed142..00000000 --- a/CMake/FindEpollShim.cmake +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # - Find EpollShim | ||
2 | # Once done, this will define | ||
3 | # | ||
4 | # EPOLLSHIM_FOUND - System has EpollShim | ||
5 | # EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories | ||
6 | # EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim | ||
7 | |||
8 | find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) | ||
9 | find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) | ||
10 | |||
11 | if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) | ||
12 | set(EPOLLSHIM_FOUND TRUE) | ||
13 | endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) | ||
14 | |||
15 | include(FindPackageHandleStandardArgs) | ||
16 | find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) | ||
17 | mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) | ||
diff --git a/CMake/FindGdkPixbuf.cmake b/CMake/FindGdkPixbuf.cmake deleted file mode 100644 index 9cad4f92..00000000 --- a/CMake/FindGdkPixbuf.cmake +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | # - Try to find the gdk-pixbuf-2.0 library | ||
2 | # Once done this will define | ||
3 | # | ||
4 | # GDK_PIXBUF_FOUND - system has gdk-pixbuf-2.0 | ||
5 | # GDK_PIXBUF_INCLUDE_DIRS - the gdk-pixbuf-2.0 include directory | ||
6 | # GDK_PIXBUF_LIBRARIES - Link these to use gdk-pixbuf-2.0 | ||
7 | # | ||
8 | # Define GDK_PIXBUF_MIN_VERSION for which version desired. | ||
9 | # | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | |||
13 | if(GdkPixbuf_FIND_REQUIRED) | ||
14 | set(_pkgconfig_REQUIRED "REQUIRED") | ||
15 | else(GdkPixbuf_FIND_REQUIRED) | ||
16 | set(_pkgconfig_REQUIRED "") | ||
17 | endif(GdkPixbuf_FIND_REQUIRED) | ||
18 | |||
19 | if(GDK_PIXBUF_MIN_VERSION) | ||
20 | pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0>=${GDK_PIXBUF_MIN_VERSION}") | ||
21 | else(GDK_PIXBUF_MIN_VERSION) | ||
22 | pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0") | ||
23 | endif(GDK_PIXBUF_MIN_VERSION) | ||
24 | |||
25 | if(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) | ||
26 | find_path(GDK_PIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h) | ||
27 | find_library(GDK_PIXBUF_LIBRARIES gdk_pixbuf-2.0) | ||
28 | else(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) | ||
29 | SET(GdkPixbuf_FOUND 1) | ||
30 | # Make paths absolute https://stackoverflow.com/a/35476270 | ||
31 | # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path | ||
32 | set(GDK_PIXBUF_LIBS_ABSOLUTE) | ||
33 | foreach(lib ${GDK_PIXBUF_LIBRARIES}) | ||
34 | set(var_name GDK_PIXBUF_${lib}_ABS) | ||
35 | find_library(${var_name} ${lib} ${GDK_PIXBUF_LIBRARY_DIRS}) | ||
36 | list(APPEND GDK_PIXBUF_LIBS_ABSOLUTE ${${var_name}}) | ||
37 | endforeach() | ||
38 | set(GDK_PIXBUF_LIBRARIES ${GDK_PIXBUF_LIBS_ABSOLUTE}) | ||
39 | endif(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) | ||
40 | |||
41 | include(FindPackageHandleStandardArgs) | ||
42 | find_package_handle_standard_args(GDK_PIXBUF DEFAULT_MSG GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS) | ||
43 | mark_as_advanced(GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS) | ||
diff --git a/CMake/FindJsonC.cmake b/CMake/FindJsonC.cmake deleted file mode 100644 index bbf6930c..00000000 --- a/CMake/FindJsonC.cmake +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | # - Find json-c | ||
2 | # Find the json-c libraries | ||
3 | # | ||
4 | # This module defines the following variables: | ||
5 | # JSONC_FOUND - True if JSONC is found | ||
6 | # JSONC_LIBRARIES - JSONC libraries | ||
7 | # JSONC_INCLUDE_DIRS - JSONC include directories | ||
8 | # | ||
9 | |||
10 | find_package(PkgConfig) | ||
11 | |||
12 | if (JsonC_FIND_REQUIRED) | ||
13 | set(_pkgconfig_REQUIRED "REQUIRED") | ||
14 | else() | ||
15 | set(_pkgconfig_REQUIRED "") | ||
16 | endif() | ||
17 | |||
18 | if(JsonC_FIND_VERSION) | ||
19 | pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c=${JsonC_FIND_VERSION}) | ||
20 | else() | ||
21 | pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c) | ||
22 | endif() | ||
23 | |||
24 | find_path(JSONC_INCLUDE_DIRS NAMES json-c/json.h HINTS ${PC_JSONC_INCLUDE_DIRS}) | ||
25 | find_library(JSONC_LIBRARIES NAMES json-c HINTS ${PC_JSONC_LIBRARY_DIRS}) | ||
26 | include(FindPackageHandleStandardArgs) | ||
27 | |||
28 | find_package_handle_standard_args(JSONC DEFAULT_MSG JSONC_LIBRARIES JSONC_INCLUDE_DIRS) | ||
29 | mark_as_advanced(JSONC_LIBRARIES JSONC_INCLUDE_DIRS) | ||
diff --git a/CMake/FindLibInput.cmake b/CMake/FindLibInput.cmake deleted file mode 100644 index 87721998..00000000 --- a/CMake/FindLibInput.cmake +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | #.rst: | ||
2 | # FindLibInput | ||
3 | # ------- | ||
4 | # | ||
5 | # Find LibInput library | ||
6 | # | ||
7 | # Try to find LibInpu library. The following values are defined | ||
8 | # | ||
9 | # :: | ||
10 | # | ||
11 | # LIBINPUT_FOUND - True if libinput is available | ||
12 | # LIBINPUT_INCLUDE_DIRS - Include directories for libinput | ||
13 | # LIBINPUT_LIBRARIES - List of libraries for libinput | ||
14 | # LIBINPUT_DEFINITIONS - List of definitions for libinput | ||
15 | # | ||
16 | # and also the following more fine grained variables | ||
17 | # | ||
18 | # :: | ||
19 | # | ||
20 | # LIBINPUT_VERSION | ||
21 | # LIBINPUT_VERSION_MAJOR | ||
22 | # LIBINPUT_VERSION_MINOR | ||
23 | # LIBINPUT_VERSION_MICRO | ||
24 | # | ||
25 | #============================================================================= | ||
26 | # Copyright (c) 2015 Jari Vetoniemi | ||
27 | # | ||
28 | # Distributed under the OSI-approved BSD License (the "License"); | ||
29 | # | ||
30 | # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
31 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
32 | # See the License for more information. | ||
33 | #============================================================================= | ||
34 | |||
35 | include(FeatureSummary) | ||
36 | set_package_properties(LibInput PROPERTIES | ||
37 | URL "http://freedesktop.org/wiki/Software/libinput/" | ||
38 | DESCRIPTION "Library to handle input devices") | ||
39 | |||
40 | find_package(PkgConfig) | ||
41 | pkg_check_modules(PC_INPUT QUIET libinput) | ||
42 | find_library(LIBINPUT_LIBRARIES NAMES input HINTS ${PC_INPUT_LIBRARY_DIRS}) | ||
43 | find_path(LIBINPUT_INCLUDE_DIRS libinput.h HINTS ${PC_INPUT_INCLUDE_DIRS}) | ||
44 | |||
45 | set(LIBINPUT_VERSION ${PC_INPUT_VERSION}) | ||
46 | string(REPLACE "." ";" VERSION_LIST "${PC_INPUT_VERSION}") | ||
47 | |||
48 | LIST(LENGTH VERSION_LIST n) | ||
49 | if (n EQUAL 3) | ||
50 | list(GET VERSION_LIST 0 LIBINPUT_VERSION_MAJOR) | ||
51 | list(GET VERSION_LIST 1 LIBINPUT_VERSION_MINOR) | ||
52 | list(GET VERSION_LIST 2 LIBINPUT_VERSION_MICRO) | ||
53 | endif () | ||
54 | |||
55 | # This is compatible with libinput-version.h that exists in upstream | ||
56 | # but isn't in distribution (probably forgotten) | ||
57 | set(LIBINPUT_DEFINITIONS ${PC_INPUT_CFLAGS_OTHER} | ||
58 | -DLIBINPUT_VERSION=\"${LIBINPUT_VERSION}\" | ||
59 | -DLIBINPUT_VERSION_MAJOR=${LIBINPUT_VERSION_MAJOR} | ||
60 | -DLIBINPUT_VERSION_MINOR=${LIBINPUT_VERSION_MINOR} | ||
61 | -DLIBINPUT_VERSION_MICRO=${LIBINPUT_VERSION_MICRO}) | ||
62 | |||
63 | include(FindPackageHandleStandardArgs) | ||
64 | find_package_handle_standard_args(LIBINPUT DEFAULT_MSG LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES) | ||
65 | mark_as_advanced(LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES LIBINPUT_DEFINITIONS | ||
66 | LIBINPUT_VERSION LIBINPUT_VERSION_MAJOR LIBINPUT_VERSION_MICRO LIBINPUT_VERSION_MINOR) | ||
diff --git a/CMake/FindLibcap.cmake b/CMake/FindLibcap.cmake deleted file mode 100644 index b34e5e37..00000000 --- a/CMake/FindLibcap.cmake +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #.rst: | ||
2 | # FindLibcap | ||
3 | # ------- | ||
4 | # | ||
5 | # Find Libcap library | ||
6 | # | ||
7 | # Try to find Libcap library. The following values are defined | ||
8 | # | ||
9 | # :: | ||
10 | # | ||
11 | # Libcap_FOUND - True if Libcap is available | ||
12 | # Libcap_INCLUDE_DIRS - Include directories for Libcap | ||
13 | # Libcap_LIBRARIES - List of libraries for Libcap | ||
14 | # Libcap_DEFINITIONS - List of definitions for Libcap | ||
15 | # | ||
16 | # and also the following more fine grained variables | ||
17 | # | ||
18 | # :: | ||
19 | # | ||
20 | # Libcap_VERSION | ||
21 | # Libcap_VERSION_MAJOR | ||
22 | # Libcap_VERSION_MINOR | ||
23 | # | ||
24 | #============================================================================= | ||
25 | # Copyright (c) 2017 Jerzi Kaminsky | ||
26 | # | ||
27 | # Distributed under the OSI-approved BSD License (the "License"); | ||
28 | # | ||
29 | # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
30 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
31 | # See the License for more information. | ||
32 | #============================================================================= | ||
33 | |||
34 | include(FeatureSummary) | ||
35 | set_package_properties(Libcap PROPERTIES | ||
36 | URL "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2" | ||
37 | DESCRIPTION "Library for getting and setting POSIX.1e capabilities") | ||
38 | |||
39 | find_package(PkgConfig) | ||
40 | pkg_check_modules(PC_CAP QUIET Libcap) | ||
41 | find_library(Libcap_LIBRARIES NAMES cap HINTS ${PC_CAP_LIBRARY_DIRS}) | ||
42 | find_path(Libcap_INCLUDE_DIRS sys/capability.h HINTS ${PC_CAP_INCLUDE_DIRS}) | ||
43 | |||
44 | set(Libcap_VERSION ${PC_CAP_VERSION}) | ||
45 | string(REPLACE "." ";" VERSION_LIST "${PC_CAP_VERSION}") | ||
46 | |||
47 | LIST(LENGTH VERSION_LIST n) | ||
48 | if (n EQUAL 2) | ||
49 | list(GET VERSION_LIST 0 Libcap_VERSION_MAJOR) | ||
50 | list(GET VERSION_LIST 1 Libcap_VERSION_MINOR) | ||
51 | endif () | ||
52 | |||
53 | include(FindPackageHandleStandardArgs) | ||
54 | find_package_handle_standard_args(Libcap DEFAULT_MSG Libcap_INCLUDE_DIRS Libcap_LIBRARIES) | ||
55 | mark_as_advanced(Libcap_INCLUDE_DIRS Libcap_LIBRARIES Libcap_DEFINITIONS | ||
56 | Libcap_VERSION Libcap_VERSION_MAJOR Libcap_VERSION_MICRO Libcap_VERSION_MINOR) | ||
diff --git a/CMake/FindPAM.cmake b/CMake/FindPAM.cmake deleted file mode 100644 index 7e6e333a..00000000 --- a/CMake/FindPAM.cmake +++ /dev/null | |||
@@ -1,245 +0,0 @@ | |||
1 | # - Try to find the PAM libraries | ||
2 | # Once done this will define | ||
3 | # | ||
4 | # PAM_FOUND - system has pam | ||
5 | # PAM_INCLUDE_DIR - the pam include directory | ||
6 | # PAM_LIBRARIES - libpam library | ||
7 | |||
8 | if (PAM_INCLUDE_DIR AND PAM_LIBRARY) | ||
9 | set(PAM_FIND_QUIETLY TRUE) | ||
10 | endif (PAM_INCLUDE_DIR AND PAM_LIBRARY) | ||
11 | |||
12 | find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h pam/pam_appl.h) | ||
13 | find_library(PAM_LIBRARY pam) | ||
14 | find_library(DL_LIBRARY dl) | ||
15 | |||
16 | if (PAM_INCLUDE_DIR AND PAM_LIBRARY) | ||
17 | set(PAM_FOUND TRUE) | ||
18 | if (DL_LIBRARY) | ||
19 | set(PAM_LIBRARIES ${PAM_LIBRARY} ${DL_LIBRARY}) | ||
20 | else (DL_LIBRARY) | ||
21 | set(PAM_LIBRARIES ${PAM_LIBRARY}) | ||
22 | endif (DL_LIBRARY) | ||
23 | |||
24 | if (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h) | ||
25 | set(HAVE_PAM_PAM_APPL_H 1) | ||
26 | endif (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h) | ||
27 | endif (PAM_INCLUDE_DIR AND PAM_LIBRARY) | ||
28 | |||
29 | if (PAM_FOUND) | ||
30 | if (NOT PAM_FIND_QUIETLY) | ||
31 | message(STATUS "Found PAM: ${PAM_LIBRARIES}") | ||
32 | endif (NOT PAM_FIND_QUIETLY) | ||
33 | else (PAM_FOUND) | ||
34 | if (PAM_FIND_REQUIRED) | ||
35 | message(FATAL_ERROR "PAM was not found") | ||
36 | endif(PAM_FIND_REQUIRED) | ||
37 | endif (PAM_FOUND) | ||
38 | |||
39 | mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY DL_LIBRARY) | ||
40 | |||
41 | # This file taken from https://github.com/FreeRDP/FreeRDP | ||
42 | # | ||
43 | # | ||
44 | # | ||
45 | # Apache License | ||
46 | # Version 2.0, January 2004 | ||
47 | # http://www.apache.org/licenses/ | ||
48 | # | ||
49 | # TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
50 | # | ||
51 | # 1. Definitions. | ||
52 | # | ||
53 | # "License" shall mean the terms and conditions for use, reproduction, | ||
54 | # and distribution as defined by Sections 1 through 9 of this document. | ||
55 | # | ||
56 | # "Licensor" shall mean the copyright owner or entity authorized by | ||
57 | # the copyright owner that is granting the License. | ||
58 | # | ||
59 | # "Legal Entity" shall mean the union of the acting entity and all | ||
60 | # other entities that control, are controlled by, or are under common | ||
61 | # control with that entity. For the purposes of this definition, | ||
62 | # "control" means (i) the power, direct or indirect, to cause the | ||
63 | # direction or management of such entity, whether by contract or | ||
64 | # otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
65 | # outstanding shares, or (iii) beneficial ownership of such entity. | ||
66 | # | ||
67 | # "You" (or "Your") shall mean an individual or Legal Entity | ||
68 | # exercising permissions granted by this License. | ||
69 | # | ||
70 | # "Source" form shall mean the preferred form for making modifications, | ||
71 | # including but not limited to software source code, documentation | ||
72 | # source, and configuration files. | ||
73 | # | ||
74 | # "Object" form shall mean any form resulting from mechanical | ||
75 | # transformation or translation of a Source form, including but | ||
76 | # not limited to compiled object code, generated documentation, | ||
77 | # and conversions to other media types. | ||
78 | # | ||
79 | # "Work" shall mean the work of authorship, whether in Source or | ||
80 | # Object form, made available under the License, as indicated by a | ||
81 | # copyright notice that is included in or attached to the work | ||
82 | # (an example is provided in the Appendix below). | ||
83 | # | ||
84 | # "Derivative Works" shall mean any work, whether in Source or Object | ||
85 | # form, that is based on (or derived from) the Work and for which the | ||
86 | # editorial revisions, annotations, elaborations, or other modifications | ||
87 | # represent, as a whole, an original work of authorship. For the purposes | ||
88 | # of this License, Derivative Works shall not include works that remain | ||
89 | # separable from, or merely link (or bind by name) to the interfaces of, | ||
90 | # the Work and Derivative Works thereof. | ||
91 | # | ||
92 | # "Contribution" shall mean any work of authorship, including | ||
93 | # the original version of the Work and any modifications or additions | ||
94 | # to that Work or Derivative Works thereof, that is intentionally | ||
95 | # submitted to Licensor for inclusion in the Work by the copyright owner | ||
96 | # or by an individual or Legal Entity authorized to submit on behalf of | ||
97 | # the copyright owner. For the purposes of this definition, "submitted" | ||
98 | # means any form of electronic, verbal, or written communication sent | ||
99 | # to the Licensor or its representatives, including but not limited to | ||
100 | # communication on electronic mailing lists, source code control systems, | ||
101 | # and issue tracking systems that are managed by, or on behalf of, the | ||
102 | # Licensor for the purpose of discussing and improving the Work, but | ||
103 | # excluding communication that is conspicuously marked or otherwise | ||
104 | # designated in writing by the copyright owner as "Not a Contribution." | ||
105 | # | ||
106 | # "Contributor" shall mean Licensor and any individual or Legal Entity | ||
107 | # on behalf of whom a Contribution has been received by Licensor and | ||
108 | # subsequently incorporated within the Work. | ||
109 | # | ||
110 | # 2. Grant of Copyright License. Subject to the terms and conditions of | ||
111 | # this License, each Contributor hereby grants to You a perpetual, | ||
112 | # worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
113 | # copyright license to reproduce, prepare Derivative Works of, | ||
114 | # publicly display, publicly perform, sublicense, and distribute the | ||
115 | # Work and such Derivative Works in Source or Object form. | ||
116 | # | ||
117 | # 3. Grant of Patent License. Subject to the terms and conditions of | ||
118 | # this License, each Contributor hereby grants to You a perpetual, | ||
119 | # worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
120 | # (except as stated in this section) patent license to make, have made, | ||
121 | # use, offer to sell, sell, import, and otherwise transfer the Work, | ||
122 | # where such license applies only to those patent claims licensable | ||
123 | # by such Contributor that are necessarily infringed by their | ||
124 | # Contribution(s) alone or by combination of their Contribution(s) | ||
125 | # with the Work to which such Contribution(s) was submitted. If You | ||
126 | # institute patent litigation against any entity (including a | ||
127 | # cross-claim or counterclaim in a lawsuit) alleging that the Work | ||
128 | # or a Contribution incorporated within the Work constitutes direct | ||
129 | # or contributory patent infringement, then any patent licenses | ||
130 | # granted to You under this License for that Work shall terminate | ||
131 | # as of the date such litigation is filed. | ||
132 | # | ||
133 | # 4. Redistribution. You may reproduce and distribute copies of the | ||
134 | # Work or Derivative Works thereof in any medium, with or without | ||
135 | # modifications, and in Source or Object form, provided that You | ||
136 | # meet the following conditions: | ||
137 | # | ||
138 | # (a) You must give any other recipients of the Work or | ||
139 | # Derivative Works a copy of this License; and | ||
140 | # | ||
141 | # (b) You must cause any modified files to carry prominent notices | ||
142 | # stating that You changed the files; and | ||
143 | # | ||
144 | # (c) You must retain, in the Source form of any Derivative Works | ||
145 | # that You distribute, all copyright, patent, trademark, and | ||
146 | # attribution notices from the Source form of the Work, | ||
147 | # excluding those notices that do not pertain to any part of | ||
148 | # the Derivative Works; and | ||
149 | # | ||
150 | # (d) If the Work includes a "NOTICE" text file as part of its | ||
151 | # distribution, then any Derivative Works that You distribute must | ||
152 | # include a readable copy of the attribution notices contained | ||
153 | # within such NOTICE file, excluding those notices that do not | ||
154 | # pertain to any part of the Derivative Works, in at least one | ||
155 | # of the following places: within a NOTICE text file distributed | ||
156 | # as part of the Derivative Works; within the Source form or | ||
157 | # documentation, if provided along with the Derivative Works; or, | ||
158 | # within a display generated by the Derivative Works, if and | ||
159 | # wherever such third-party notices normally appear. The contents | ||
160 | # of the NOTICE file are for informational purposes only and | ||
161 | # do not modify the License. You may add Your own attribution | ||
162 | # notices within Derivative Works that You distribute, alongside | ||
163 | # or as an addendum to the NOTICE text from the Work, provided | ||
164 | # that such additional attribution notices cannot be construed | ||
165 | # as modifying the License. | ||
166 | # | ||
167 | # You may add Your own copyright statement to Your modifications and | ||
168 | # may provide additional or different license terms and conditions | ||
169 | # for use, reproduction, or distribution of Your modifications, or | ||
170 | # for any such Derivative Works as a whole, provided Your use, | ||
171 | # reproduction, and distribution of the Work otherwise complies with | ||
172 | # the conditions stated in this License. | ||
173 | # | ||
174 | # 5. Submission of Contributions. Unless You explicitly state otherwise, | ||
175 | # any Contribution intentionally submitted for inclusion in the Work | ||
176 | # by You to the Licensor shall be under the terms and conditions of | ||
177 | # this License, without any additional terms or conditions. | ||
178 | # Notwithstanding the above, nothing herein shall supersede or modify | ||
179 | # the terms of any separate license agreement you may have executed | ||
180 | # with Licensor regarding such Contributions. | ||
181 | # | ||
182 | # 6. Trademarks. This License does not grant permission to use the trade | ||
183 | # names, trademarks, service marks, or product names of the Licensor, | ||
184 | # except as required for reasonable and customary use in describing the | ||
185 | # origin of the Work and reproducing the content of the NOTICE file. | ||
186 | # | ||
187 | # 7. Disclaimer of Warranty. Unless required by applicable law or | ||
188 | # agreed to in writing, Licensor provides the Work (and each | ||
189 | # Contributor provides its Contributions) on an "AS IS" BASIS, | ||
190 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
191 | # implied, including, without limitation, any warranties or conditions | ||
192 | # of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||
193 | # PARTICULAR PURPOSE. You are solely responsible for determining the | ||
194 | # appropriateness of using or redistributing the Work and assume any | ||
195 | # risks associated with Your exercise of permissions under this License. | ||
196 | # | ||
197 | # 8. Limitation of Liability. In no event and under no legal theory, | ||
198 | # whether in tort (including negligence), contract, or otherwise, | ||
199 | # unless required by applicable law (such as deliberate and grossly | ||
200 | # negligent acts) or agreed to in writing, shall any Contributor be | ||
201 | # liable to You for damages, including any direct, indirect, special, | ||
202 | # incidental, or consequential damages of any character arising as a | ||
203 | # result of this License or out of the use or inability to use the | ||
204 | # Work (including but not limited to damages for loss of goodwill, | ||
205 | # work stoppage, computer failure or malfunction, or any and all | ||
206 | # other commercial damages or losses), even if such Contributor | ||
207 | # has been advised of the possibility of such damages. | ||
208 | # | ||
209 | # 9. Accepting Warranty or Additional Liability. While redistributing | ||
210 | # the Work or Derivative Works thereof, You may choose to offer, | ||
211 | # and charge a fee for, acceptance of support, warranty, indemnity, | ||
212 | # or other liability obligations and/or rights consistent with this | ||
213 | # License. However, in accepting such obligations, You may act only | ||
214 | # on Your own behalf and on Your sole responsibility, not on behalf | ||
215 | # of any other Contributor, and only if You agree to indemnify, | ||
216 | # defend, and hold each Contributor harmless for any liability | ||
217 | # incurred by, or claims asserted against, such Contributor by reason | ||
218 | # of your accepting any such warranty or additional liability. | ||
219 | # | ||
220 | # END OF TERMS AND CONDITIONS | ||
221 | # | ||
222 | # APPENDIX: How to apply the Apache License to your work. | ||
223 | # | ||
224 | # To apply the Apache License to your work, attach the following | ||
225 | # boilerplate notice, with the fields enclosed by brackets "[]" | ||
226 | # replaced with your own identifying information. (Don't include | ||
227 | # the brackets!) The text should be enclosed in the appropriate | ||
228 | # comment syntax for the file format. We also recommend that a | ||
229 | # file or class name and description of purpose be included on the | ||
230 | # same "printed page" as the copyright notice for easier | ||
231 | # identification within third-party archives. | ||
232 | # | ||
233 | # Copyright [yyyy] [name of copyright owner] | ||
234 | # | ||
235 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||
236 | # you may not use this file except in compliance with the License. | ||
237 | # You may obtain a copy of the License at | ||
238 | # | ||
239 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
240 | # | ||
241 | # Unless required by applicable law or agreed to in writing, software | ||
242 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
243 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
244 | # See the License for the specific language governing permissions and | ||
245 | # limitations under the License. | ||
diff --git a/CMake/FindPCRE.cmake b/CMake/FindPCRE.cmake deleted file mode 100644 index dbbd60ad..00000000 --- a/CMake/FindPCRE.cmake +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | # Copyright (C) 2007-2009 LuaDist. | ||
2 | # Created by Peter Kapec <kapecp@gmail.com> | ||
3 | # Redistribution and use of this file is allowed according to the terms of the MIT license. | ||
4 | # For details see the COPYRIGHT file distributed with LuaDist. | ||
5 | # Note: | ||
6 | # Searching headers and libraries is very simple and is NOT as powerful as scripts | ||
7 | # distributed with CMake, because LuaDist defines directories to search for. | ||
8 | # Everyone is encouraged to contact the author with improvements. Maybe this file | ||
9 | # becomes part of CMake distribution sometimes. | ||
10 | |||
11 | # - Find pcre | ||
12 | # Find the native PCRE headers and libraries. | ||
13 | # | ||
14 | # PCRE_INCLUDE_DIRS - where to find pcre.h, etc. | ||
15 | # PCRE_LIBRARIES - List of libraries when using pcre. | ||
16 | # PCRE_FOUND - True if pcre found. | ||
17 | |||
18 | # Look for the header file. | ||
19 | FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h) | ||
20 | |||
21 | # Look for the library. | ||
22 | FIND_LIBRARY(PCRE_LIBRARY NAMES pcre) | ||
23 | |||
24 | # Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE. | ||
25 | INCLUDE(FindPackageHandleStandardArgs) | ||
26 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR) | ||
27 | |||
28 | # Copy the results to the output variables. | ||
29 | IF(PCRE_FOUND) | ||
30 | SET(PCRE_LIBRARIES ${PCRE_LIBRARY}) | ||
31 | SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) | ||
32 | ELSE(PCRE_FOUND) | ||
33 | SET(PCRE_LIBRARIES) | ||
34 | SET(PCRE_INCLUDE_DIRS) | ||
35 | ENDIF(PCRE_FOUND) | ||
36 | |||
37 | MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES) | ||
diff --git a/CMake/FindPango.cmake b/CMake/FindPango.cmake deleted file mode 100644 index eb296d75..00000000 --- a/CMake/FindPango.cmake +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | # - Try to find the pango library | ||
2 | # Once done this will define | ||
3 | # | ||
4 | # PANGO_FOUND - system has pango | ||
5 | # PANGO_INCLUDE_DIRS - the pango include directory | ||
6 | # PANGO_LIBRARIES - Link these to use pango | ||
7 | # | ||
8 | # Define PANGO_MIN_VERSION for which version desired. | ||
9 | # | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | |||
13 | if(Pango_FIND_REQUIRED) | ||
14 | set(_pkgconfig_REQUIRED "REQUIRED") | ||
15 | else(Pango_FIND_REQUIRED) | ||
16 | set(_pkgconfig_REQUIRED "") | ||
17 | endif(Pango_FIND_REQUIRED) | ||
18 | |||
19 | if(PANGO_MIN_VERSION) | ||
20 | pkg_check_modules(PANGO ${_pkgconfig_REQUIRED} "pango>=${PANGO_MIN_VERSION}" "pangocairo>=${PANGO_MIN_VERSION}") | ||
21 | else(PANGO_MIN_VERSION) | ||
22 | pkg_check_modules(PANGO ${_pkgconfig_REQUIRED} pango pangocairo) | ||
23 | endif(PANGO_MIN_VERSION) | ||
24 | |||
25 | if(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
26 | find_path(PANGO_INCLUDE_DIRS pango.h) | ||
27 | find_library(PANGO_LIBRARIES pango pangocairo) | ||
28 | else(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
29 | # Make paths absolute https://stackoverflow.com/a/35476270 | ||
30 | # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path | ||
31 | set(PANGO_LIBS_ABSOLUTE) | ||
32 | foreach(lib ${PANGO_LIBRARIES}) | ||
33 | set(var_name PANGO_${lib}_ABS) | ||
34 | find_library(${var_name} ${lib} ${PANGO_LIBRARY_DIRS}) | ||
35 | list(APPEND PANGO_LIBS_ABSOLUTE ${${var_name}}) | ||
36 | endforeach() | ||
37 | set(PANGO_LIBRARIES ${PANGO_LIBS_ABSOLUTE}) | ||
38 | endif(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) | ||
39 | |||
40 | include(FindPackageHandleStandardArgs) | ||
41 | find_package_handle_standard_args(PANGO DEFAULT_MSG PANGO_LIBRARIES PANGO_INCLUDE_DIRS) | ||
42 | mark_as_advanced(PANGO_LIBRARIES PANGO_INCLUDE_DIRS) | ||
diff --git a/CMake/FindWLC.cmake b/CMake/FindWLC.cmake deleted file mode 100644 index 15b26ce7..00000000 --- a/CMake/FindWLC.cmake +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | # - Find wlc | ||
2 | # Find the wlc libraries | ||
3 | # | ||
4 | # This module defines the following variables: | ||
5 | # WLC_FOUND - True if wlc is found | ||
6 | # WLC_LIBRARIES - wlc libraries | ||
7 | # WLC_INCLUDE_DIRS - wlc include directories | ||
8 | # WLC_DEFINITIONS - Compiler switches required for using wlc | ||
9 | # | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | pkg_check_modules(PC_WLC QUIET wlc) | ||
13 | find_path(WLC_INCLUDE_DIRS NAMES wlc/wlc.h HINTS ${PC_WLC_INCLUDE_DIRS}) | ||
14 | find_library(WLC_LIBRARIES NAMES wlc HINTS ${PC_WLC_LIBRARY_DIRS}) | ||
15 | |||
16 | set(WLC_DEFINITIONS ${PC_WLC_CFLAGS_OTHER}) | ||
17 | |||
18 | include(FindPackageHandleStandardArgs) | ||
19 | find_package_handle_standard_args(wlc DEFAULT_MSG WLC_LIBRARIES WLC_INCLUDE_DIRS) | ||
20 | mark_as_advanced(WLC_LIBRARIES WLC_INCLUDE_DIRS) | ||
diff --git a/CMake/FindWayland.cmake b/CMake/FindWayland.cmake deleted file mode 100644 index 69130fe0..00000000 --- a/CMake/FindWayland.cmake +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | # Try to find Wayland on a Unix system | ||
2 | # | ||
3 | # This will define: | ||
4 | # | ||
5 | # WAYLAND_FOUND - True if Wayland is found | ||
6 | # WAYLAND_LIBRARIES - Link these to use Wayland | ||
7 | # WAYLAND_INCLUDE_DIR - Include directory for Wayland | ||
8 | # WAYLAND_DEFINITIONS - Compiler flags for using Wayland | ||
9 | # | ||
10 | # In addition the following more fine grained variables will be defined: | ||
11 | # | ||
12 | # WAYLAND_CLIENT_FOUND WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES | ||
13 | # WAYLAND_SERVER_FOUND WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES | ||
14 | # WAYLAND_EGL_FOUND WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES | ||
15 | # WAYLAND_CURSOR_FOUND WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES | ||
16 | # | ||
17 | # Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org> | ||
18 | # | ||
19 | # Redistribution and use is allowed according to the terms of the BSD license. | ||
20 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
21 | |||
22 | IF (NOT WIN32) | ||
23 | IF (WAYLAND_INCLUDE_DIR AND WAYLAND_LIBRARIES) | ||
24 | # In the cache already | ||
25 | SET(WAYLAND_FIND_QUIETLY TRUE) | ||
26 | ENDIF () | ||
27 | |||
28 | # Use pkg-config to get the directories and then use these values | ||
29 | # in the FIND_PATH() and FIND_LIBRARY() calls | ||
30 | FIND_PACKAGE(PkgConfig) | ||
31 | PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor) | ||
32 | |||
33 | SET(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS}) | ||
34 | |||
35 | FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) | ||
36 | FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) | ||
37 | FIND_PATH(WAYLAND_EGL_INCLUDE_DIR NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) | ||
38 | FIND_PATH(WAYLAND_CURSOR_INCLUDE_DIR NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) | ||
39 | |||
40 | FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) | ||
41 | FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) | ||
42 | FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) | ||
43 | FIND_LIBRARY(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) | ||
44 | |||
45 | set(WAYLAND_INCLUDE_DIR ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_SERVER_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_CURSOR_INCLUDE_DIR}) | ||
46 | |||
47 | set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES}) | ||
48 | |||
49 | list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIR) | ||
50 | |||
51 | include(FindPackageHandleStandardArgs) | ||
52 | |||
53 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR) | ||
54 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR) | ||
55 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR) | ||
56 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR) | ||
57 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR) | ||
58 | |||
59 | MARK_AS_ADVANCED( | ||
60 | WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES | ||
61 | WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES | ||
62 | WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES | ||
63 | WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES | ||
64 | WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES | ||
65 | ) | ||
66 | |||
67 | ENDIF () | ||
diff --git a/CMake/FindWlroots.cmake b/CMake/FindWlroots.cmake deleted file mode 100644 index 0e349d3a..00000000 --- a/CMake/FindWlroots.cmake +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | # - Find wlroots | ||
2 | # Find the wlroots libraries | ||
3 | # | ||
4 | # This module defines the following variables: | ||
5 | # WLR_FOUND - True if wlroots is found | ||
6 | # WLR_LIBRARIES - wlroots libraries | ||
7 | # WLR_INCLUDE_DIRS - wlroots include directories | ||
8 | # WLR_DEFINITIONS - Compiler switches required for using wlroots | ||
9 | # | ||
10 | |||
11 | find_package(PkgConfig) | ||
12 | pkg_check_modules(PC_WLR QUIET wlroots) | ||
13 | find_path(WLR_INCLUDE_DIRS NAMES wlr/config.h HINTS ${PC_WLR_INCLUDE_DIRS}) | ||
14 | find_library(WLR_LIBRARIES NAMES wlroots HINTS ${PC_WLR_LIBRARY_DIRS}) | ||
15 | |||
16 | set(WLR_DEFINITIONS ${PC_WLR_CFLAGS_OTHER}) | ||
17 | |||
18 | include(FindPackageHandleStandardArgs) | ||
19 | find_package_handle_standard_args(wlr DEFAULT_MSG WLR_LIBRARIES WLR_INCLUDE_DIRS) | ||
20 | mark_as_advanced(WLR_LIBRARIES WLR_INCLUDE_DIRS) | ||
diff --git a/CMake/FindXKBCommon.cmake b/CMake/FindXKBCommon.cmake deleted file mode 100644 index 30ac503a..00000000 --- a/CMake/FindXKBCommon.cmake +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # - Find XKBCommon | ||
2 | # Once done, this will define | ||
3 | # | ||
4 | # XKBCOMMON_FOUND - System has XKBCommon | ||
5 | # XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories | ||
6 | # XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon | ||
7 | # XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon | ||
8 | |||
9 | find_package(PkgConfig) | ||
10 | pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon) | ||
11 | find_path(XKBCOMMON_INCLUDE_DIRS NAMES xkbcommon/xkbcommon.h HINTS ${PC_XKBCOMMON_INCLUDE_DIRS}) | ||
12 | find_library(XKBCOMMON_LIBRARIES NAMES xkbcommon HINTS ${PC_XKBCOMMON_LIBRARY_DIRS}) | ||
13 | |||
14 | set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER}) | ||
15 | |||
16 | include(FindPackageHandleStandardArgs) | ||
17 | find_package_handle_standard_args(XKBCOMMON DEFAULT_MSG XKBCOMMON_LIBRARIES XKBCOMMON_INCLUDE_DIRS) | ||
18 | mark_as_advanced(XKBCOMMON_LIBRARIES XKBCOMMON_INCLUDE_DIRS) | ||
19 | |||
diff --git a/CMake/Manpage.cmake b/CMake/Manpage.cmake deleted file mode 100644 index bbd6f2dc..00000000 --- a/CMake/Manpage.cmake +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | find_package(A2X) | ||
2 | |||
3 | if (A2X_FOUND) | ||
4 | add_custom_target(man ALL) | ||
5 | |||
6 | function(add_manpage name section) | ||
7 | add_custom_command( | ||
8 | OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} | ||
9 | COMMAND ${A2X_COMMAND} | ||
10 | --no-xmllint | ||
11 | --doctype manpage | ||
12 | --format manpage | ||
13 | -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} | ||
14 | ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt | ||
15 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt | ||
16 | COMMENT Generating manpage for ${name}.${section} | ||
17 | ) | ||
18 | |||
19 | add_custom_target(man-${name}.${section} | ||
20 | DEPENDS | ||
21 | ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} | ||
22 | ) | ||
23 | add_dependencies(man | ||
24 | man-${name}.${section} | ||
25 | ) | ||
26 | |||
27 | install( | ||
28 | FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} | ||
29 | DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man${section} | ||
30 | COMPONENT documentation | ||
31 | ) | ||
32 | endfunction() | ||
33 | endif() | ||
diff --git a/CMake/Wayland.cmake b/CMake/Wayland.cmake deleted file mode 100644 index f9349667..00000000 --- a/CMake/Wayland.cmake +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | #============================================================================= | ||
2 | # Copyright (C) 2012-2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
3 | # All rights reserved. | ||
4 | # | ||
5 | # Redistribution and use in source and binary forms, with or without | ||
6 | # modification, are permitted provided that the following conditions | ||
7 | # are met: | ||
8 | # | ||
9 | # * Redistributions of source code must retain the above copyright | ||
10 | # notice, this list of conditions and the following disclaimer. | ||
11 | # | ||
12 | # * Redistributions in binary form must reproduce the above copyright | ||
13 | # notice, this list of conditions and the following disclaimer in the | ||
14 | # documentation and/or other materials provided with the distribution. | ||
15 | # | ||
16 | # * Neither the name of Pier Luigi Fiorini nor the names of his | ||
17 | # contributors may be used to endorse or promote products derived | ||
18 | # from this software without specific prior written permission. | ||
19 | # | ||
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
24 | # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
31 | #============================================================================= | ||
32 | |||
33 | find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) | ||
34 | |||
35 | # wayland_add_protocol_client(outfiles inputfile basename) | ||
36 | function(WAYLAND_ADD_PROTOCOL_CLIENT _sources _protocol _basename) | ||
37 | if(NOT WAYLAND_SCANNER_EXECUTABLE) | ||
38 | message(FATAL "The wayland-scanner executable has not been found on your system. You must install it.") | ||
39 | endif() | ||
40 | |||
41 | get_filename_component(_infile ${_protocol} ABSOLUTE) | ||
42 | set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.h") | ||
43 | set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.c") | ||
44 | |||
45 | add_custom_command(OUTPUT "${_client_header}" | ||
46 | COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header < ${_infile} > ${_client_header} | ||
47 | DEPENDS ${_infile} VERBATIM) | ||
48 | |||
49 | add_custom_command(OUTPUT "${_code}" | ||
50 | COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code} | ||
51 | DEPENDS ${_infile} VERBATIM) | ||
52 | |||
53 | list(APPEND ${_sources} "${_client_header}" "${_code}") | ||
54 | set(${_sources} ${${_sources}} PARENT_SCOPE) | ||
55 | endfunction() | ||
56 | |||
57 | # wayland_add_protocol_server(outfiles inputfile basename) | ||
58 | function(WAYLAND_ADD_PROTOCOL_SERVER _sources _protocol _basename) | ||
59 | if(NOT WAYLAND_SCANNER_EXECUTABLE) | ||
60 | message(FATAL "The wayland-scanner executable has not been found on your system. You must install it.") | ||
61 | endif() | ||
62 | |||
63 | get_filename_component(_infile ${_protocol} ABSOLUTE) | ||
64 | set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.h") | ||
65 | set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.c") | ||
66 | |||
67 | add_custom_command(OUTPUT "${_server_header}" | ||
68 | COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header < ${_infile} > ${_server_header} | ||
69 | DEPENDS ${_infile} VERBATIM) | ||
70 | |||
71 | add_custom_command(OUTPUT "${_code}" | ||
72 | COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code} | ||
73 | DEPENDS ${_infile} VERBATIM) | ||
74 | |||
75 | list(APPEND ${_sources} "${_server_header}" "${_code}") | ||
76 | set(${_sources} ${${_sources}} PARENT_SCOPE) | ||
77 | endfunction() | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 9580e15d..00000000 --- a/CMakeLists.txt +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | cmake_minimum_required(VERSION 3.1.0) | ||
2 | |||
3 | project(sway C) | ||
4 | |||
5 | add_compile_options(-g) | ||
6 | set(CMAKE_C_STANDARD 99) | ||
7 | set(CMAKE_C_EXTENSIONS OFF) | ||
8 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
9 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) | ||
10 | add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror) | ||
11 | |||
12 | # Add Address Sanitiezed build type | ||
13 | set(CMAKE_C_FLAGS_ASAN | ||
14 | "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer" | ||
15 | CACHE STRING "Flags used by the C compiler during address sanitizer builds." | ||
16 | FORCE ) | ||
17 | mark_as_advanced( | ||
18 | CMAKE_C_FLAGS_ASAN | ||
19 | CMAKE_EXE_LINKER_FLAGS_DEBUG | ||
20 | CMAKE_SHARED_LINKER_FLAGS_DEBUG | ||
21 | ) | ||
22 | |||
23 | list(INSERT CMAKE_MODULE_PATH 0 | ||
24 | ${CMAKE_CURRENT_SOURCE_DIR}/CMake | ||
25 | ) | ||
26 | |||
27 | if (VERSION) | ||
28 | add_definitions(-DSWAY_VERSION=\"${VERSION}\") | ||
29 | else() | ||
30 | execute_process( | ||
31 | COMMAND git describe --always --tags | ||
32 | OUTPUT_VARIABLE GIT_COMMIT_HASH | ||
33 | OUTPUT_STRIP_TRAILING_WHITESPACE | ||
34 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
35 | ) | ||
36 | execute_process( | ||
37 | COMMAND git rev-parse --abbrev-ref HEAD | ||
38 | OUTPUT_VARIABLE GIT_BRANCH | ||
39 | OUTPUT_STRIP_TRAILING_WHITESPACE | ||
40 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
41 | ) | ||
42 | |||
43 | string(TIMESTAMP CURRENT_DATE "%Y-%m-%d" UTC) | ||
44 | add_definitions("-DSWAY_VERSION=\"${GIT_COMMIT_HASH} (${CURRENT_DATE}, branch \\\"${GIT_BRANCH}\\\")\"") | ||
45 | endif() | ||
46 | |||
47 | option(enable-swaylock "Enables the swaylock utility" YES) | ||
48 | option(enable-swaybg "Enables the wallpaper utility" YES) | ||
49 | option(enable-swaybar "Enables the swaybar utility" YES) | ||
50 | option(enable-swaygrab "Enables the swaygrab utility" YES) | ||
51 | option(enable-swaymsg "Enables the swaymsg utility" YES) | ||
52 | option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES) | ||
53 | option(enable-tray "Enables the swaybar tray" YES) | ||
54 | option(zsh-completions "Zsh shell completions" NO) | ||
55 | option(default-wallpaper "Installs the default wallpaper" YES) | ||
56 | option(LD_LIBRARY_PATH "Configure sway's default LD_LIBRARY_PATH") | ||
57 | |||
58 | if (LD_LIBRARY_PATH) | ||
59 | add_definitions(-D_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}") | ||
60 | endif() | ||
61 | |||
62 | find_package(JsonC 0.12.1 REQUIRED) | ||
63 | find_package(PCRE REQUIRED) | ||
64 | find_package(Wlroots REQUIRED) | ||
65 | find_package(Wayland REQUIRED) | ||
66 | find_package(XKBCommon REQUIRED) | ||
67 | find_package(Cairo REQUIRED) | ||
68 | find_package(Pango REQUIRED) | ||
69 | find_package(GdkPixbuf) | ||
70 | find_package(PAM) | ||
71 | find_package(DBus 1.10) | ||
72 | |||
73 | find_package(LibInput REQUIRED) | ||
74 | |||
75 | if (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
76 | find_package(Libcap REQUIRED) | ||
77 | endif (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
78 | |||
79 | if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
80 | find_package(EpollShim REQUIRED) | ||
81 | endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
82 | |||
83 | include(FeatureSummary) | ||
84 | include(Manpage) | ||
85 | include(GNUInstallDirs) | ||
86 | |||
87 | if (enable-gdk-pixbuf) | ||
88 | if (GDK_PIXBUF_FOUND) | ||
89 | set(WITH_GDK_PIXBUF YES) | ||
90 | add_definitions(-DWITH_GDK_PIXBUF) | ||
91 | else() | ||
92 | message(WARNING "gdk-pixbuf required but not found, only png images supported.") | ||
93 | endif() | ||
94 | else() | ||
95 | message(STATUS "Building without gdk-pixbuf, only png images supported.") | ||
96 | endif() | ||
97 | |||
98 | if (enable-tray) | ||
99 | if (DBUS_FOUND) | ||
100 | set(ENABLE_TRAY TRUE) | ||
101 | add_definitions(-DENABLE_TRAY) | ||
102 | else() | ||
103 | message(WARNING "Tray required but DBus was not found. Tray will not be included") | ||
104 | endif() | ||
105 | else() | ||
106 | message(STATUS "Building without the tray.") | ||
107 | endif() | ||
108 | |||
109 | include_directories(include) | ||
110 | |||
111 | add_subdirectory(protocols) | ||
112 | add_subdirectory(common) | ||
113 | add_subdirectory(wayland) | ||
114 | |||
115 | add_subdirectory(sway) | ||
116 | if(enable-swaybg) | ||
117 | if(CAIRO_FOUND AND PANGO_FOUND) | ||
118 | # TODO WLR | ||
119 | #add_subdirectory(swaybg) | ||
120 | else() | ||
121 | message(WARNING "Not building swaybg - cairo, and pango are required.") | ||
122 | endif() | ||
123 | endif() | ||
124 | if(enable-swaymsg) | ||
125 | add_subdirectory(swaymsg) | ||
126 | endif() | ||
127 | if(enable-swaygrab) | ||
128 | # TODO WLR | ||
129 | #add_subdirectory(swaygrab) | ||
130 | endif() | ||
131 | if(enable-swaybar) | ||
132 | if(CAIRO_FOUND AND PANGO_FOUND) | ||
133 | # TODO WLR | ||
134 | #add_subdirectory(swaybar) | ||
135 | else() | ||
136 | message(WARNING "Not building swaybar - cairo, and pango are required.") | ||
137 | endif() | ||
138 | endif() | ||
139 | if(enable-swaylock) | ||
140 | if(CAIRO_FOUND AND PANGO_FOUND AND PAM_FOUND) | ||
141 | # TODO WLR | ||
142 | #add_subdirectory(swaylock) | ||
143 | else() | ||
144 | message(WARNING "Not building swaylock - cairo, pango, and PAM are required.") | ||
145 | endif() | ||
146 | endif() | ||
147 | if(zsh-completions) | ||
148 | add_subdirectory(completions/zsh) | ||
149 | endif() | ||
150 | install( | ||
151 | FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop | ||
152 | DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/wayland-sessions | ||
153 | COMPONENT data | ||
154 | ) | ||
155 | |||
156 | if(default-wallpaper) | ||
157 | install( | ||
158 | DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/ | ||
159 | DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/backgrounds/sway | ||
160 | COMPONENT data | ||
161 | FILES_MATCHING PATTERN "*Wallpaper*" | ||
162 | ) | ||
163 | endif() | ||
164 | |||
165 | feature_summary(WHAT ALL) | ||
@@ -22,14 +22,3 @@ assertion fails. | |||
22 | 22 | ||
23 | Outside of the compositor (swaymsg, swaybar, etc), using `assert.h` is | 23 | Outside of the compositor (swaymsg, swaybar, etc), using `assert.h` is |
24 | permitted. | 24 | permitted. |
25 | |||
26 | ## Building against a local wlc | ||
27 | |||
28 | 1. Build wlc as described [here](https://github.com/Cloudef/wlc#building) | ||
29 | 2. Inside your sway source folder, tell `cmake` to use your local version of wlc: | ||
30 | |||
31 | ```bash | ||
32 | cmake \ | ||
33 | -DWLC_LIBRARIES=path/to/wlc/target/src/libwlc.so \ | ||
34 | -DWLC_INCLUDE_DIRS=path/to/wlc/include . | ||
35 | ``` | ||
diff --git a/README.de.md b/README.de.md index 701cc34f..47084ad3 100644 --- a/README.de.md +++ b/README.de.md | |||
@@ -52,7 +52,7 @@ schau im IRC-Channel vorbei oder schreibe eine e-Mail an sir@cmpwn.com (nur engl | |||
52 | 52 | ||
53 | Abhängigkeiten: | 53 | Abhängigkeiten: |
54 | 54 | ||
55 | * cmake | 55 | * meson |
56 | * [wlc](https://github.com/Cloudef/wlc) | 56 | * [wlc](https://github.com/Cloudef/wlc) |
57 | * wayland | 57 | * wayland |
58 | * xwayland | 58 | * xwayland |
@@ -74,11 +74,9 @@ _\*\*Nur erforderlich für swaylock_ | |||
74 | 74 | ||
75 | Führe diese Befehle aus: | 75 | Führe diese Befehle aus: |
76 | 76 | ||
77 | mkdir build | 77 | meson build |
78 | cd build | 78 | ninja -C build |
79 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 79 | sudo ninja -C build install |
80 | make | ||
81 | sudo make install | ||
82 | 80 | ||
83 | In Systemen mit logind musst du `sway` einige Capabilities geben: | 81 | In Systemen mit logind musst du `sway` einige Capabilities geben: |
84 | 82 | ||
diff --git a/README.el.md b/README.el.md index df39364f..dd1889e4 100644 --- a/README.el.md +++ b/README.el.md | |||
@@ -45,7 +45,7 @@ To username μου στο Freenode είναι kon14 και θα με βÏείτΠ| |||
45 | 45 | ||
46 | Εγκατάσταση εξαÏτήσεων: | 46 | Εγκατάσταση εξαÏτήσεων: |
47 | 47 | ||
48 | * cmake | 48 | * meson |
49 | * [wlc](https://github.com/Cloudef/wlc) | 49 | * [wlc](https://github.com/Cloudef/wlc) |
50 | * wayland | 50 | * wayland |
51 | * xwayland | 51 | * xwayland |
@@ -67,11 +67,9 @@ _\*\*Απαιτείται μόνο για swaylock_ | |||
67 | 67 | ||
68 | ΕκτελÎστε αυτÎÏ‚ τις εντολÎÏ‚: | 68 | ΕκτελÎστε αυτÎÏ‚ τις εντολÎÏ‚: |
69 | 69 | ||
70 | mkdir build | 70 | meson build |
71 | cd build | 71 | ninja -C build |
72 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 72 | sudo ninja -C build install |
73 | make | ||
74 | sudo make install | ||
75 | 73 | ||
76 | Σε συστήματα με logind, χÏειάζεται να οÏίσετε μεÏικά δικαιώματα caps στο εκτελÎσιμο αÏχείο: | 74 | Σε συστήματα με logind, χÏειάζεται να οÏίσετε μεÏικά δικαιώματα caps στο εκτελÎσιμο αÏχείο: |
77 | 75 | ||
diff --git a/README.fr.md b/README.fr.md index 47b6c410..5baee7a8 100644 --- a/README.fr.md +++ b/README.fr.md | |||
@@ -47,7 +47,7 @@ IRC ou envoyez un e-mail à sir@cmpwn.com (en anglais seulement) pour des consei | |||
47 | 47 | ||
48 | Installez les dépendances : | 48 | Installez les dépendances : |
49 | 49 | ||
50 | * cmake | 50 | * meson |
51 | * [wlc](https://github.com/Cloudef/wlc) | 51 | * [wlc](https://github.com/Cloudef/wlc) |
52 | * wayland | 52 | * wayland |
53 | * xwayland | 53 | * xwayland |
@@ -69,11 +69,9 @@ _\*\*Uniquement requis pour swaylock_ | |||
69 | 69 | ||
70 | Exécutez ces commandes : | 70 | Exécutez ces commandes : |
71 | 71 | ||
72 | mkdir build | 72 | meson build |
73 | cd build | 73 | ninja -C build |
74 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 74 | sudo ninja -C build install |
75 | make | ||
76 | sudo make install | ||
77 | 75 | ||
78 | Sur les systèmes avec logind, vous devez définir quelques caps sur le binaire : | 76 | Sur les systèmes avec logind, vous devez définir quelques caps sur le binaire : |
79 | 77 | ||
diff --git a/README.it.md b/README.it.md index f5e0d8e2..af344405 100644 --- a/README.it.md +++ b/README.it.md | |||
@@ -48,7 +48,7 @@ a sir@cmpwn.com. | |||
48 | 48 | ||
49 | Installa queste dipendenze: | 49 | Installa queste dipendenze: |
50 | 50 | ||
51 | * cmake | 51 | * meson |
52 | * [wlc](https://github.com/Cloudef/wlc) | 52 | * [wlc](https://github.com/Cloudef/wlc) |
53 | * wayland | 53 | * wayland |
54 | * xwayland | 54 | * xwayland |
@@ -70,11 +70,9 @@ _\*\*Richiesto solo per swaylock_ | |||
70 | 70 | ||
71 | Esegui questi comandi: | 71 | Esegui questi comandi: |
72 | 72 | ||
73 | mkdir build | 73 | meson build |
74 | cd build | 74 | ninja -C build |
75 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 75 | sudo ninja -C build install |
76 | make | ||
77 | sudo make install | ||
78 | 76 | ||
79 | Per i sistemi con logind, devi impostare un paio di caps sull'eseguibile: | 77 | Per i sistemi con logind, devi impostare un paio di caps sull'eseguibile: |
80 | 78 | ||
diff --git a/README.ja.md b/README.ja.md index 2e8f9bfb..cf89971c 100644 --- a/README.ja.md +++ b/README.ja.md | |||
@@ -38,7 +38,7 @@ Swayã¯æ²¢å±±ã®ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ューションã§æä¾›ã•ã‚Œã¦ã„ã¾ã™ã€‚" | |||
38 | 38 | ||
39 | 次ã®ä¾å˜ãƒ‘ッケージをインストールã—ã¦ãã ã•ã„: | 39 | 次ã®ä¾å˜ãƒ‘ッケージをインストールã—ã¦ãã ã•ã„: |
40 | 40 | ||
41 | * cmake | 41 | * meson |
42 | * [wlc](https://github.com/Cloudef/wlc) | 42 | * [wlc](https://github.com/Cloudef/wlc) |
43 | * wayland | 43 | * wayland |
44 | * xwayland | 44 | * xwayland |
@@ -60,11 +60,9 @@ _\*\*swaylockã§ã®ã¿å¿…è¦ã§ã™_ | |||
60 | 60 | ||
61 | 次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãã ã•ã„: | 61 | 次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ãã ã•ã„: |
62 | 62 | ||
63 | mkdir build | 63 | meson build |
64 | cd build | 64 | ninja -C build |
65 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 65 | sudo ninja -C build install |
66 | make | ||
67 | sudo make install | ||
68 | 66 | ||
69 | logindを使用ã—ã¦ã„るシステムã§ã¯ã€ãƒã‚¤ãƒŠãƒªã«ã„ãã¤ã‹ã®ã‚±ãƒ¼ãƒ‘ビリティをè¨å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: | 67 | logindを使用ã—ã¦ã„るシステムã§ã¯ã€ãƒã‚¤ãƒŠãƒªã«ã„ãã¤ã‹ã®ã‚±ãƒ¼ãƒ‘ビリティをè¨å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™: |
70 | 68 | ||
@@ -53,7 +53,7 @@ channel or shoot an email to sir@cmpwn.com for advice. | |||
53 | 53 | ||
54 | Install dependencies: | 54 | Install dependencies: |
55 | 55 | ||
56 | * cmake | 56 | * meson |
57 | * [wlroots](https://github.com/swaywm/wlroots) | 57 | * [wlroots](https://github.com/swaywm/wlroots) |
58 | * wayland | 58 | * wayland |
59 | * xwayland | 59 | * xwayland |
@@ -78,11 +78,9 @@ _\*\*\*Only required for tray support_ | |||
78 | 78 | ||
79 | Run these commands: | 79 | Run these commands: |
80 | 80 | ||
81 | mkdir build | 81 | meson build |
82 | cd build | 82 | ninja -C build |
83 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 83 | sudo ninja -C build install |
84 | make | ||
85 | sudo make install | ||
86 | 84 | ||
87 | On systems with logind, you need to set a few caps on the binary: | 85 | On systems with logind, you need to set a few caps on the binary: |
88 | 86 | ||
diff --git a/README.pt.md b/README.pt.md index b5ca132f..ff51ac2c 100644 --- a/README.pt.md +++ b/README.pt.md | |||
@@ -54,7 +54,7 @@ visite o canal no IRC ou mande um email para sir@cmpwn.com (*em inglês*). | |||
54 | 54 | ||
55 | Antes de iniciar a compilação, instale as dependências: | 55 | Antes de iniciar a compilação, instale as dependências: |
56 | 56 | ||
57 | * cmake | 57 | * meson |
58 | * [wlc](https://github.com/Cloudef/wlc) | 58 | * [wlc](https://github.com/Cloudef/wlc) |
59 | * wayland | 59 | * wayland |
60 | * xwayland | 60 | * xwayland |
@@ -76,11 +76,9 @@ _\*\*Dependência apenas de swaylock_ | |||
76 | 76 | ||
77 | Para compilar, execute estes comandos: | 77 | Para compilar, execute estes comandos: |
78 | 78 | ||
79 | mkdir build | 79 | meson build |
80 | cd build | 80 | ninja -C build |
81 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 81 | sudo ninja -C build install |
82 | make | ||
83 | sudo make install | ||
84 | 82 | ||
85 | Em sistemas com logind, configure as seguintes capacidades para o arquivo binário: | 83 | Em sistemas com logind, configure as seguintes capacidades para o arquivo binário: |
86 | 84 | ||
diff --git a/README.ru.md b/README.ru.md index 4035b0fc..12890d2d 100644 --- a/README.ru.md +++ b/README.ru.md | |||
@@ -47,7 +47,7 @@ Sway доÑтупен во многих диÑтрибутивах и наход | |||
47 | 47 | ||
48 | УÑтановите Ñледующие пакеты: | 48 | УÑтановите Ñледующие пакеты: |
49 | 49 | ||
50 | * cmake | 50 | * meson |
51 | * [wlc](https://github.com/Cloudef/wlc) | 51 | * [wlc](https://github.com/Cloudef/wlc) |
52 | * wayland | 52 | * wayland |
53 | * xwayland | 53 | * xwayland |
@@ -69,11 +69,9 @@ _\*\*ТребуетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð´Ð»Ñ swaylock_ | |||
69 | 69 | ||
70 | Выполните Ñледующие команды: | 70 | Выполните Ñледующие команды: |
71 | 71 | ||
72 | mkdir build | 72 | meson build |
73 | cd build | 73 | ninja -C build |
74 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 74 | sudo ninja -C build install |
75 | make | ||
76 | sudo make install | ||
77 | 75 | ||
78 | ЕÑли у Ð²Ð°Ñ logind: | 76 | ЕÑли у Ð²Ð°Ñ logind: |
79 | 77 | ||
diff --git a/README.uk.md b/README.uk.md index 2e107afc..37a33e4c 100644 --- a/README.uk.md +++ b/README.uk.md | |||
@@ -54,7 +54,7 @@ Sway доÑтупний у багатьох диÑтрибутивах Linux (а | |||
54 | 54 | ||
55 | Ð’Ñтановіть залежноÑÑ‚Ñ–: | 55 | Ð’Ñтановіть залежноÑÑ‚Ñ–: |
56 | 56 | ||
57 | * cmake | 57 | * meson |
58 | * [wlc](https://github.com/Cloudef/wlc) | 58 | * [wlc](https://github.com/Cloudef/wlc) |
59 | * wayland | 59 | * wayland |
60 | * xwayland | 60 | * xwayland |
@@ -76,11 +76,9 @@ _\*\*Лише Ð´Ð»Ñ swaylock_ | |||
76 | 76 | ||
77 | Виконайте ці команди: | 77 | Виконайте ці команди: |
78 | 78 | ||
79 | mkdir build | 79 | meson build |
80 | cd build | 80 | ninja -C build |
81 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. | 81 | sudo ninja -C build install |
82 | make | ||
83 | sudo make install | ||
84 | 82 | ||
85 | Ðа ÑиÑтемах **з** logind, варто вÑтановити декілька можливоÑтей (caps) | 83 | Ðа ÑиÑтемах **з** logind, варто вÑтановити декілька можливоÑтей (caps) |
86 | на виконуваний файл sway: | 84 | на виконуваний файл sway: |
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt deleted file mode 100644 index 4fa71f3a..00000000 --- a/common/CMakeLists.txt +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${WLC_INCLUDE_DIRS} | ||
3 | ${XKBCOMMON_INCLUDE_DIRS} | ||
4 | ) | ||
5 | |||
6 | add_library(sway-common STATIC | ||
7 | ipc-client.c | ||
8 | list.c | ||
9 | log.c | ||
10 | util.c | ||
11 | readline.c | ||
12 | stringop.c | ||
13 | ) | ||
14 | |||
15 | target_link_libraries(sway-common m) | ||
diff --git a/common/meson.build b/common/meson.build new file mode 100644 index 00000000..3a4282ad --- /dev/null +++ b/common/meson.build | |||
@@ -0,0 +1,11 @@ | |||
1 | lib_sway_common = static_library('sway-common', | ||
2 | files( | ||
3 | 'log.c', | ||
4 | 'list.c', | ||
5 | 'util.c', | ||
6 | 'stringop.c', | ||
7 | 'readline.c', | ||
8 | 'ipc-client.c' | ||
9 | ), | ||
10 | include_directories: sway_inc | ||
11 | ) | ||
diff --git a/completions/zsh/CMakeLists.txt b/completions/zsh/CMakeLists.txt deleted file mode 100644 index 62c85090..00000000 --- a/completions/zsh/CMakeLists.txt +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | install( | ||
2 | FILES _sway _swaymsg _swaygrab _swaylock | ||
3 | DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/zsh/site-functions/ | ||
4 | ) | ||
@@ -21,7 +21,7 @@ set $menu dmenu_run | |||
21 | ### Output configuration | 21 | ### Output configuration |
22 | # | 22 | # |
23 | # Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/) | 23 | # Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/) |
24 | output * bg __DATADIR__/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill | 24 | output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill |
25 | # | 25 | # |
26 | # Example configuration: | 26 | # Example configuration: |
27 | # | 27 | # |
@@ -194,4 +194,4 @@ bar { | |||
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | include __SYSCONFDIR__/sway/config.d/* | 197 | include @sysconfdir@/sway/config.d/* |
diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..695e237e --- /dev/null +++ b/meson.build | |||
@@ -0,0 +1,147 @@ | |||
1 | project( | ||
2 | 'sway', | ||
3 | 'c', | ||
4 | license: 'MIT', | ||
5 | default_options: [ | ||
6 | 'c_std=c11', | ||
7 | 'warning_level=2', | ||
8 | 'werror=true', | ||
9 | ], | ||
10 | ) | ||
11 | |||
12 | add_project_arguments('-Wno-unused-parameter', language: 'c') | ||
13 | |||
14 | cc = meson.get_compiler('c') | ||
15 | |||
16 | is_freebsd = host_machine.system().startswith('freebsd') | ||
17 | datadir = get_option('datadir') | ||
18 | sysconfdir = get_option('sysconfdir') | ||
19 | prefix = get_option('prefix') | ||
20 | |||
21 | jsonc = dependency('json-c', version: '>=0.12.1') | ||
22 | pcre = dependency('libpcre') | ||
23 | wlroots = dependency('wlroots') | ||
24 | wayland_server = dependency('wayland-server') | ||
25 | wayland_client = dependency('wayland-client') | ||
26 | wayland_egl = dependency('wayland-egl') | ||
27 | wayland_protos = dependency('wayland-protocols') | ||
28 | xkbcommon = dependency('xkbcommon') | ||
29 | pango = dependency('pango') | ||
30 | pixman = dependency('pixman-1') | ||
31 | libcap = dependency('libcap') | ||
32 | math = cc.find_library('m') | ||
33 | git = find_program('git', required: false) | ||
34 | a2x = find_program('a2x', required: false) | ||
35 | |||
36 | if a2x.found() | ||
37 | mandir = get_option('mandir') | ||
38 | man_files = [ | ||
39 | 'sway/sway.1.txt', | ||
40 | 'sway/sway.5.txt', | ||
41 | 'sway/sway-bar.5.txt', | ||
42 | 'sway/sway-input.5.txt', | ||
43 | 'sway/sway-security.7.txt', | ||
44 | 'swaymsg/swaymsg.1.txt', | ||
45 | ] | ||
46 | foreach filename : man_files | ||
47 | topic = filename.split('.')[-3].split('/')[-1] | ||
48 | section = filename.split('.')[-2] | ||
49 | |||
50 | custom_target( | ||
51 | 'man-@0@-@1@'.format(topic, section), | ||
52 | input: filename, | ||
53 | output: '@BASENAME@', | ||
54 | command: [ | ||
55 | a2x, | ||
56 | '--no-xmllint', | ||
57 | '--doctype', 'manpage', | ||
58 | '--format', 'manpage', | ||
59 | '--destination-dir', meson.current_build_dir(), | ||
60 | '@INPUT@' | ||
61 | ], | ||
62 | install: true, | ||
63 | install_dir: '@0@/man@1@'.format(mandir, section) | ||
64 | ) | ||
65 | endforeach | ||
66 | endif | ||
67 | |||
68 | version = get_option('sway_version') | ||
69 | if version != '' | ||
70 | version = '"@0@"'.format(version) | ||
71 | else | ||
72 | if not git.found() | ||
73 | error('git is required to make the version string') | ||
74 | endif | ||
75 | |||
76 | git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags']).stdout().strip() | ||
77 | git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip() | ||
78 | version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch) | ||
79 | endif | ||
80 | add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c') | ||
81 | |||
82 | sway_inc = include_directories('include') | ||
83 | |||
84 | subdir('common') | ||
85 | subdir('sway') | ||
86 | subdir('swaymsg') | ||
87 | |||
88 | config = configuration_data() | ||
89 | config.set('sysconfdir', join_paths(prefix, sysconfdir)) | ||
90 | config.set('datadir', join_paths(prefix, datadir)) | ||
91 | config.set('prefix', prefix) | ||
92 | |||
93 | configure_file( | ||
94 | configuration: config, | ||
95 | input: 'config.in', | ||
96 | output: '@BASENAME@', | ||
97 | install_dir: sysconfdir + '/sway' | ||
98 | ) | ||
99 | |||
100 | if is_freebsd | ||
101 | configure_file( | ||
102 | configuration: config, | ||
103 | input: 'security.d/10-freebsd.in', | ||
104 | output: '@BASENAME@', | ||
105 | install_dir: sysconfdir + '/sway/security.d' | ||
106 | ) | ||
107 | else | ||
108 | configure_file( | ||
109 | configuration: config, | ||
110 | input: 'security.d/00-defaults.in', | ||
111 | output: '@BASENAME@', | ||
112 | install_dir: sysconfdir + '/sway/security.d' | ||
113 | ) | ||
114 | endif | ||
115 | |||
116 | install_data( | ||
117 | 'sway.desktop', | ||
118 | install_dir: datadir + '/wayland-sessions' | ||
119 | ) | ||
120 | |||
121 | if (get_option('default_wallpaper')) | ||
122 | wallpaper_files = files( | ||
123 | 'assets/Sway_Wallpaper_Blue_768x1024.png', | ||
124 | 'assets/Sway_Wallpaper_Blue_768x1024_Portrait.png', | ||
125 | 'assets/Sway_Wallpaper_Blue_1136x640.png', | ||
126 | 'assets/Sway_Wallpaper_Blue_1136x640_Portrait.png', | ||
127 | 'assets/Sway_Wallpaper_Blue_1366x768.png', | ||
128 | 'assets/Sway_Wallpaper_Blue_1920x1080.png', | ||
129 | 'assets/Sway_Wallpaper_Blue_2048x1536.png', | ||
130 | 'assets/Sway_Wallpaper_Blue_2048x1536_Portrait.png', | ||
131 | ) | ||
132 | wallpaper_install_dir = datadir + '/backgrounds/sway' | ||
133 | |||
134 | install_data(wallpaper_files, install_dir: wallpaper_install_dir) | ||
135 | endif | ||
136 | |||
137 | if (get_option('zsh_completions')) | ||
138 | zsh_files = files( | ||
139 | 'completions/zsh/_sway', | ||
140 | 'completions/zsh/_swaygrab', | ||
141 | 'completions/zsh/_swaylock', | ||
142 | 'completions/zsh/_swaymsg', | ||
143 | ) | ||
144 | zsh_install_dir = datadir + '/zsh/site-functions' | ||
145 | |||
146 | install_data(zsh_files, install_dir: zsh_install_dir) | ||
147 | endif | ||
diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..541ccf13 --- /dev/null +++ b/meson_options.txt | |||
@@ -0,0 +1,3 @@ | |||
1 | option('sway_version', type : 'string', description: 'The version string reported in `sway --version`.') | ||
2 | option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.') | ||
3 | option('zsh_completions', type: 'boolean', value: true, description: 'Install zsh shell completions.') | ||
diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt deleted file mode 100644 index 8d8e58ad..00000000 --- a/protocols/CMakeLists.txt +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | include(Wayland) | ||
2 | |||
3 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-xdg-shell | ||
4 | xdg-shell.xml | ||
5 | xdg-shell | ||
6 | ) | ||
7 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-desktop-shell | ||
8 | desktop-shell.xml | ||
9 | desktop-shell | ||
10 | ) | ||
11 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-desktop-shell | ||
12 | desktop-shell.xml | ||
13 | desktop-shell | ||
14 | ) | ||
15 | |||
16 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-swaylock | ||
17 | swaylock.xml | ||
18 | swaylock | ||
19 | ) | ||
20 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-swaylock | ||
21 | swaylock.xml | ||
22 | swaylock | ||
23 | ) | ||
24 | |||
25 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-gamma-control | ||
26 | gamma-control.xml | ||
27 | gamma-control | ||
28 | ) | ||
29 | |||
30 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-server-decoration | ||
31 | server-decoration.xml | ||
32 | server-decoration | ||
33 | ) | ||
34 | |||
35 | add_library(sway-protocols STATIC | ||
36 | ${proto-client-xdg-shell} | ||
37 | ${proto-client-desktop-shell} | ||
38 | ${proto-server-desktop-shell} | ||
39 | ${proto-client-swaylock} | ||
40 | ${proto-server-swaylock} | ||
41 | ${proto-server-gamma-control} | ||
42 | ${proto-server-server-decoration} | ||
43 | ) | ||
44 | |||
45 | set(PROTOCOLS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/protocols PARENT_SCOPE) | ||
46 | INCLUDE_DIRECTORIES(${WAYLAND_INCLUDE_DIR} ${XKBCOMMON_INCLUDE_DIRS}) | ||
diff --git a/security.d/00-defaults.in b/security.d/00-defaults.in index 05098dea..e4626477 100644 --- a/security.d/00-defaults.in +++ b/security.d/00-defaults.in | |||
@@ -6,17 +6,17 @@ | |||
6 | # installation. | 6 | # installation. |
7 | # | 7 | # |
8 | # DO NOT CHANGE THIS FILE. Override these defaults by writing new files in | 8 | # DO NOT CHANGE THIS FILE. Override these defaults by writing new files in |
9 | # __SYSCONFDIR__/sway/security.d/* | 9 | # @sysconfdir@/sway/security.d/* |
10 | 10 | ||
11 | # Configures enabled compositor features for specific programs | 11 | # Configures enabled compositor features for specific programs |
12 | permit * fullscreen keyboard mouse | 12 | permit * fullscreen keyboard mouse |
13 | permit __PREFIX__/bin/swaylock lock | 13 | permit @prefix@/bin/swaylock lock |
14 | permit __PREFIX__/bin/swaybg background | 14 | permit @prefix@/bin/swaybg background |
15 | permit __PREFIX__/bin/swaygrab screenshot | 15 | permit @prefix@/bin/swaygrab screenshot |
16 | permit __PREFIX__/bin/swaybar panel | 16 | permit @prefix@/bin/swaybar panel |
17 | 17 | ||
18 | # Configures enabled IPC features for specific programs | 18 | # Configures enabled IPC features for specific programs |
19 | ipc __PREFIX__/bin/swaymsg { | 19 | ipc @prefix@/bin/swaymsg { |
20 | * enabled | 20 | * enabled |
21 | 21 | ||
22 | events { | 22 | events { |
@@ -24,7 +24,7 @@ ipc __PREFIX__/bin/swaymsg { | |||
24 | } | 24 | } |
25 | } | 25 | } |
26 | 26 | ||
27 | ipc __PREFIX__/bin/swaybar { | 27 | ipc @prefix@/bin/swaybar { |
28 | bar-config enabled | 28 | bar-config enabled |
29 | outputs enabled | 29 | outputs enabled |
30 | workspaces enabled | 30 | workspaces enabled |
@@ -36,12 +36,12 @@ ipc __PREFIX__/bin/swaybar { | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | ipc __PREFIX__/bin/swaygrab { | 39 | ipc @prefix@/bin/swaygrab { |
40 | outputs enabled | 40 | outputs enabled |
41 | tree enabled | 41 | tree enabled |
42 | } | 42 | } |
43 | 43 | ||
44 | ipc __PREFIX__/bin/swaylock { | 44 | ipc @prefix@/bin/swaylock { |
45 | outputs enabled | 45 | outputs enabled |
46 | } | 46 | } |
47 | 47 | ||
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt deleted file mode 100644 index 274fcc4a..00000000 --- a/sway/CMakeLists.txt +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${WLR_INCLUDE_DIRS} | ||
4 | ${PCRE_INCLUDE_DIRS} | ||
5 | ${JSONC_INCLUDE_DIRS} | ||
6 | ${XKBCOMMON_INCLUDE_DIRS} | ||
7 | ${LIBINPUT_INCLUDE_DIRS} | ||
8 | ${CAIRO_INCLUDE_DIRS} | ||
9 | ${PANGO_INCLUDE_DIRS} | ||
10 | ${WAYLAND_INCLUDE_DIR} | ||
11 | ) | ||
12 | |||
13 | add_executable(sway | ||
14 | desktop/output.c | ||
15 | desktop/xdg_shell_v6.c | ||
16 | |||
17 | commands.c | ||
18 | commands/exit.c | ||
19 | |||
20 | tree/container.c | ||
21 | tree/layout.c | ||
22 | tree/workspace.c | ||
23 | |||
24 | base64.c | ||
25 | main.c | ||
26 | server.c | ||
27 | ipc-json.c | ||
28 | ipc-server.c | ||
29 | ) | ||
30 | |||
31 | add_definitions( | ||
32 | -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}" | ||
33 | ) | ||
34 | |||
35 | target_link_libraries(sway | ||
36 | sway-common | ||
37 | sway-protocols | ||
38 | sway-wayland | ||
39 | ${WLR_LIBRARIES} | ||
40 | ${XKBCOMMON_LIBRARIES} | ||
41 | ${PCRE_LIBRARIES} | ||
42 | ${JSONC_LIBRARIES} | ||
43 | ${WAYLAND_SERVER_LIBRARIES} | ||
44 | ${LIBINPUT_LIBRARIES} | ||
45 | ${PANGO_LIBRARIES} | ||
46 | ${JSONC_LIBRARIES} | ||
47 | m | ||
48 | ) | ||
49 | |||
50 | if (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
51 | target_link_libraries(sway cap) | ||
52 | endif (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
53 | |||
54 | install( | ||
55 | TARGETS sway | ||
56 | RUNTIME | ||
57 | DESTINATION bin | ||
58 | COMPONENT runtime | ||
59 | ) | ||
60 | |||
61 | add_custom_target(configs ALL) | ||
62 | |||
63 | function(add_config name source destination) | ||
64 | add_custom_command( | ||
65 | OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
66 | COMMAND sed -r | ||
67 | 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g' | ||
68 | ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
69 | DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in | ||
70 | COMMENT "Generating config file ${source}" | ||
71 | ) | ||
72 | |||
73 | install( | ||
74 | FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} | ||
75 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination} | ||
76 | COMPONENT configuration | ||
77 | ) | ||
78 | |||
79 | add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}) | ||
80 | add_dependencies(configs config-${name}) | ||
81 | endfunction() | ||
82 | |||
83 | add_config(config config sway) | ||
84 | add_config(00-defaults security.d/00-defaults sway/security.d) | ||
85 | |||
86 | if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
87 | add_config(10-freebsd security.d/10-freebsd sway/security.d) | ||
88 | endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | ||
89 | |||
90 | if (A2X_FOUND) | ||
91 | add_manpage(sway 1) | ||
92 | add_manpage(sway 5) | ||
93 | add_manpage(sway-input 5) | ||
94 | add_manpage(sway-bar 5) | ||
95 | add_manpage(sway-security 7) | ||
96 | endif() | ||
diff --git a/sway/meson.build b/sway/meson.build new file mode 100644 index 00000000..cf2aa913 --- /dev/null +++ b/sway/meson.build | |||
@@ -0,0 +1,31 @@ | |||
1 | sway_sources = files( | ||
2 | 'main.c', | ||
3 | 'server.c', | ||
4 | 'commands.c', | ||
5 | 'commands/exit.c', | ||
6 | 'ipc-json.c', | ||
7 | 'ipc-server.c', | ||
8 | 'desktop/output.c', | ||
9 | 'desktop/xdg_shell_v6.c', | ||
10 | 'tree/container.c', | ||
11 | 'tree/layout.c', | ||
12 | 'tree/workspace.c', | ||
13 | ) | ||
14 | |||
15 | sway_deps = [ | ||
16 | pixman, | ||
17 | wayland_server, | ||
18 | jsonc, | ||
19 | wlroots, | ||
20 | libcap, | ||
21 | math, | ||
22 | ] | ||
23 | |||
24 | executable( | ||
25 | 'sway', | ||
26 | sway_sources, | ||
27 | include_directories: [sway_inc], | ||
28 | dependencies: sway_deps, | ||
29 | link_with: [lib_sway_common], | ||
30 | install: true | ||
31 | ) | ||
diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt deleted file mode 100644 index 48ededdd..00000000 --- a/swaybar/CMakeLists.txt +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${WAYLAND_INCLUDE_DIR} | ||
4 | ${CAIRO_INCLUDE_DIRS} | ||
5 | ${PANGO_INCLUDE_DIRS} | ||
6 | ${JSONC_INCLUDE_DIRS} | ||
7 | ${XKBCOMMON_INCLUDE_DIRS} | ||
8 | ${DBUS_INCLUDE_DIRS} | ||
9 | ) | ||
10 | if (ENABLE_TRAY) | ||
11 | file(GLOB tray | ||
12 | tray/*.c | ||
13 | ) | ||
14 | endif() | ||
15 | |||
16 | add_executable(swaybar | ||
17 | main.c | ||
18 | config.c | ||
19 | render.c | ||
20 | bar.c | ||
21 | status_line.c | ||
22 | ipc.c | ||
23 | event_loop.c | ||
24 | ${tray} | ||
25 | ) | ||
26 | |||
27 | target_link_libraries(swaybar | ||
28 | sway-common | ||
29 | sway-wayland | ||
30 | ${WAYLAND_CLIENT_LIBRARIES} | ||
31 | ${WAYLAND_CURSOR_LIBRARIES} | ||
32 | ${CAIRO_LIBRARIES} | ||
33 | ${PANGO_LIBRARIES} | ||
34 | ${JSONC_LIBRARIES} | ||
35 | ${DBUS_LIBRARIES} | ||
36 | ) | ||
37 | |||
38 | if (WITH_GDK_PIXBUF) | ||
39 | include_directories( | ||
40 | ${GDK_PIXBUF_INCLUDE_DIRS} | ||
41 | ) | ||
42 | endif() | ||
43 | |||
44 | target_link_libraries(swaybar rt) | ||
45 | |||
46 | install( | ||
47 | TARGETS swaybar | ||
48 | RUNTIME | ||
49 | DESTINATION bin | ||
50 | COMPONENT runtime | ||
51 | ) | ||
diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt deleted file mode 100644 index f8cad404..00000000 --- a/swaybg/CMakeLists.txt +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${WAYLAND_INCLUDE_DIR} | ||
4 | ${CAIRO_INCLUDE_DIRS} | ||
5 | ${PANGO_INCLUDE_DIRS} | ||
6 | ${XKBCOMMON_INCLUDE_DIRS} | ||
7 | ) | ||
8 | |||
9 | add_executable(swaybg | ||
10 | main.c | ||
11 | ) | ||
12 | |||
13 | target_link_libraries(swaybg | ||
14 | sway-common | ||
15 | sway-wayland | ||
16 | ${WAYLAND_CLIENT_LIBRARIES} | ||
17 | ${WAYLAND_CURSOR_LIBRARIES} | ||
18 | ${CAIRO_LIBRARIES} | ||
19 | ${PANGO_LIBRARIES} | ||
20 | m | ||
21 | ) | ||
22 | |||
23 | if (WITH_GDK_PIXBUF) | ||
24 | include_directories( | ||
25 | ${GDK_PIXBUF_INCLUDE_DIRS} | ||
26 | ) | ||
27 | target_link_libraries(swaybg | ||
28 | ${GDK_PIXBUF_LIBRARIES} | ||
29 | ) | ||
30 | endif() | ||
31 | |||
32 | install( | ||
33 | TARGETS swaybg | ||
34 | RUNTIME | ||
35 | DESTINATION bin | ||
36 | COMPONENT runtime | ||
37 | ) | ||
diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt deleted file mode 100644 index 42806cae..00000000 --- a/swaygrab/CMakeLists.txt +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${JSONC_INCLUDE_DIRS} | ||
3 | ${WLC_INCLUDE_DIRS} | ||
4 | ${XKBCOMMON_INCLUDE_DIRS} | ||
5 | ) | ||
6 | |||
7 | add_executable(swaygrab | ||
8 | main.c | ||
9 | json.c | ||
10 | ) | ||
11 | |||
12 | target_link_libraries(swaygrab | ||
13 | sway-common | ||
14 | ${JSONC_LIBRARIES} | ||
15 | rt | ||
16 | m | ||
17 | ) | ||
18 | |||
19 | install( | ||
20 | TARGETS swaygrab | ||
21 | RUNTIME | ||
22 | DESTINATION bin | ||
23 | COMPONENT runtime | ||
24 | ) | ||
25 | |||
26 | if (A2X_FOUND) | ||
27 | add_manpage(swaygrab 1) | ||
28 | endif() | ||
diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt deleted file mode 100644 index 90b54a72..00000000 --- a/swaylock/CMakeLists.txt +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${WAYLAND_INCLUDE_DIR} | ||
4 | ${CAIRO_INCLUDE_DIRS} | ||
5 | ${PANGO_INCLUDE_DIRS} | ||
6 | ${PAM_INCLUDE_DIRS} | ||
7 | ${JSONC_INCLUDE_DIRS} | ||
8 | ${XKBCOMMON_INCLUDE_DIRS} | ||
9 | ) | ||
10 | |||
11 | add_executable(swaylock | ||
12 | main.c | ||
13 | ) | ||
14 | |||
15 | target_link_libraries(swaylock | ||
16 | sway-common | ||
17 | sway-wayland | ||
18 | ${WAYLAND_CLIENT_LIBRARIES} | ||
19 | ${WAYLAND_CURSOR_LIBRARIES} | ||
20 | ${CAIRO_LIBRARIES} | ||
21 | ${PANGO_LIBRARIES} | ||
22 | ${PAM_LIBRARIES} | ||
23 | ${JSONC_LIBRARIES} | ||
24 | m | ||
25 | ) | ||
26 | |||
27 | if (WITH_GDK_PIXBUF) | ||
28 | include_directories( | ||
29 | ${GDK_PIXBUF_INCLUDE_DIRS} | ||
30 | ) | ||
31 | target_link_libraries(swaylock | ||
32 | ${GDK_PIXBUF_LIBRARIES} | ||
33 | ) | ||
34 | endif() | ||
35 | |||
36 | install( | ||
37 | TARGETS swaylock | ||
38 | RUNTIME | ||
39 | DESTINATION bin | ||
40 | COMPONENT runtime | ||
41 | ) | ||
42 | |||
43 | install( | ||
44 | FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock | ||
45 | DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/ | ||
46 | COMPONENT data | ||
47 | ) | ||
48 | |||
49 | if (A2X_FOUND) | ||
50 | add_manpage(swaylock 1) | ||
51 | endif() | ||
diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt deleted file mode 100644 index b428a409..00000000 --- a/swaymsg/CMakeLists.txt +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | add_executable(swaymsg | ||
2 | main.c | ||
3 | ) | ||
4 | |||
5 | include_directories( | ||
6 | ${JSONC_INCLUDE_DIRS} | ||
7 | ) | ||
8 | |||
9 | target_link_libraries(swaymsg | ||
10 | sway-common | ||
11 | ${JSONC_LIBRARIES} | ||
12 | ) | ||
13 | |||
14 | install( | ||
15 | TARGETS swaymsg | ||
16 | RUNTIME | ||
17 | DESTINATION bin | ||
18 | COMPONENT runtime | ||
19 | ) | ||
20 | |||
21 | if (A2X_FOUND) | ||
22 | add_manpage(swaymsg 1) | ||
23 | endif() | ||
diff --git a/swaymsg/meson.build b/swaymsg/meson.build new file mode 100644 index 00000000..2d678878 --- /dev/null +++ b/swaymsg/meson.build | |||
@@ -0,0 +1,8 @@ | |||
1 | executable( | ||
2 | 'swaymsg', | ||
3 | 'main.c', | ||
4 | include_directories: [sway_inc], | ||
5 | dependencies: [jsonc], | ||
6 | link_with: [lib_sway_common], | ||
7 | install: true | ||
8 | ) | ||
diff --git a/wayland/CMakeLists.txt b/wayland/CMakeLists.txt deleted file mode 100644 index 91fd7fff..00000000 --- a/wayland/CMakeLists.txt +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | include_directories( | ||
2 | ${PROTOCOLS_INCLUDE_DIRS} | ||
3 | ${PANGO_INCLUDE_DIRS} | ||
4 | ${XKBCOMMON_INCLUDE_DIRS} | ||
5 | ${WAYLAND_INCLUDE_DIR} | ||
6 | ${EPOLLSHIM_INCLUDE_DIRS} | ||
7 | ) | ||
8 | |||
9 | add_library(sway-wayland STATIC | ||
10 | buffers.c | ||
11 | pango.c | ||
12 | registry.c | ||
13 | window.c | ||
14 | cairo.c | ||
15 | ) | ||
16 | |||
17 | target_link_libraries(sway-wayland | ||
18 | sway-common | ||
19 | sway-protocols | ||
20 | ${PANGO_LIBRARIES} | ||
21 | ${XKBCOMMON_LIBRARIES} | ||
22 | ${EPOLLSHIM_LIBRARIES} | ||
23 | ) | ||
24 | |||
25 | if (WITH_GDK_PIXBUF) | ||
26 | include_directories( | ||
27 | ${GDK_PIXBUF_INCLUDE_DIRS} | ||
28 | ) | ||
29 | target_link_libraries(sway-wayland | ||
30 | ${GDK_PIXBUF_LIBRARIES} | ||
31 | ) | ||
32 | endif() | ||