* Add libei and libportal
* Port libei and libportal code by Peter Hutterer and Olivier Fourdan
* Add Peter Hutterer and Olivier Fourdan to important devs list
* Improve error handling for libei and libportal builds
* Checkout libportal tags/0.7.1
* Hack out the gi-docgen clone
* Remove new submodules in favor of using ExternalProject_Add
* Remove submodule dirs
* Use ExternalProject_Add instead of submodules
* Fixed namespace
* Hack to work around type libportal causing type conflicts
* Add log helper functions
* Use original log functions
* Switch to FetchContent, use libportal a1530a9 (unreleased) and use camelCase member names for consistency
* Restore a few events (much more work required)
* Add TODOs for supporting multiple lib versions
* Revert "Switch to FetchContent, use libportal a1530a9 (unreleased) and use camelCase member names for consistency"
This reverts commit 610cebb5b6a08282eee68f4424fcdbe9eaab4bf9.
* Simplify cmake config by removing builds for libei and libportal (will do this in `install_deps.py` instead)
* Remove submodules
* Remove .gitmodules
* Use meson to build subprojects
* Update copyright with Peter Hutterer's guidance
* Use meson for installing deps
* Fixed typo in tag name
* Remove submodules
* Remove old submodules
* Fixed libei name
* Defaults for pugixml and gtest depending on whether source exists in subprojects
* Ignore some subproject dirs
* Make deps OS-specific
* Move python deps to pyproject
* Only compile and install on Linux with Meson
* Revert "Move python deps to pyproject"
This reverts commit 92c8a287b8376a4d166058c85f1d6081f6fdb423.
* Add ninja to brewfile
* Add python3-attr
* Restore original coverage config
* Add ninja for meson
* Include meson in same try-except
* Fixed ninja dep name
* Move libs to correct oS
* Fixed include for wintoast
* Disable docs for libportal
* More options for libei and libportal
* Fixed option for libei
* Use ninja directly to install
* Revert "Use ninja directly to install"
This reverts commit c926d78ba483406a55acd10fb157c39e13f90b71.
* Meson install verbose
* Prints stdout/stderr
* Remove `from None`
* Remove submodules that somehow crept back in?!
* Prepend sudo if exists
* Add libei deps for all distros
* Fixed Fedora package name
* Add more deps for other distros
* Add more libs (including pugixml)
* Fix lib name
* Drop -u from pacman
* Add vala to rhel
* Make libportal optional
* Make portal link optional
* Remove example code
* Always use system pugixml
* Disable interactive apt through install_deps.py
* Revert "Disable interactive apt through install_deps.py"
This reverts commit 5bbc8fd689182447c79b81db16c961b98361a292.
* Set DEBIAN_FRONTEND in workflows
* Set DEBIAN_FRONTEND in CodeQL workflow
* Add gtest dep
* Add bundled libei dep
* Add libei dep to Arch
* Use `googletest` on openSUSE
* Add gmock dep
* Remove gtest dep from openSUSE
* Add libei on Fedora
* Bundle libei for older Linux distros
* Disable libei dep for RPM
* Also bundle symlink to .so
* Use ${CMAKE_INSTALL_LIBDIR}
* Rename libei to fix openSUSE
* List installed files
* Add libei-devel to openSUSE
* Add googletest-devel to openSUSE
* Remove manual deps (probably resolved automatically)
* Remove googletest from openSUSE (doesn't provide google mock)
* Only add Portal* if libportal found
* WIP - Partial work on using old events system :'(
* Add deps install commands for subprojects
* Solved more compile issues related to events system, threads, etc
* Fixed bad config for adding x, ei, portal sources
* Remove redundant deps
* Remove (another) redundant dep
* Fixed pacman command
* Add Ubuntu and Linux Mint libei deps
* Fixed Ubuntu and Linux Mint libei deps aliases
* Only iterate subprojects if not None
* Add rhel, rocky, and alma for libei
* Make rhel-like deps same as fedora again
* Build libportal on rhel-like
* Re-enable meson rhel-like for libportal
* Remove dbus-python
* Make libportal optional (for rhel-like)
* Handle ei event queue results
* Re-introduce libportal
* Print libei and libportal versions
* Add ei/portal args and client screen
* Switch --use args to --no
* Don't build libei/libportal on older distros as it's pointless
* Make libei and libportal optional
* Add Debian 13 runner
* Make some packages optional
* Remove subprojects
* Improve comment
* Add comment for libportal
* Improve comment
* Add Debian 13 runner
* Make optional... optional
* Change continuation stripper to remove newline and continuation char
* Make command strip more uniform
* Fixed help var syntax
* Fixed libei linking
* Ensure `kHelpNoWayland` is always defined
* Improve help message
* Fixed Debian 13 runner name
* Include sstream and use const var
* Update ChangeLog
* Remove Wayland block
* Return new timer
* Make tray icon logging verbose
* Fixed arg parser for wayland args
* Fixed init of EI screen
* Fixed lint issues
* Update README to indicate Wayland support in GNOME 46
* Add missing word
* Fixed comment positions
* Automate CI env
* Tone down debug log messages
* Add missing comma
* Remove redundant log line
152 lines
4 KiB
CMake
152 lines
4 KiB
CMake
# Synergy -- mouse and keyboard sharing utility
|
|
# Copyright (C) 2012-2024 Symless Ltd.
|
|
# Copyright (C) 2009-2012 Nick Bolton
|
|
#
|
|
# This package is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# found in the file LICENSE that should have accompanied this file.
|
|
#
|
|
# This package is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
macro(config_all_tests)
|
|
|
|
set(base_dir ${CMAKE_SOURCE_DIR})
|
|
set(src_dir ${base_dir}/src)
|
|
set(test_base_dir ${src_dir}/test)
|
|
set(gui_dir ${src_dir}/gui/src)
|
|
|
|
config_test_deps()
|
|
|
|
add_subdirectory(integtests)
|
|
add_subdirectory(unittests)
|
|
|
|
endmacro()
|
|
|
|
macro(config_test)
|
|
|
|
include_directories(
|
|
${test_base_dir}
|
|
${src_dir}
|
|
${src_dir}/lib
|
|
${gui_dir}
|
|
${ext_dir})
|
|
|
|
set_sources()
|
|
|
|
endmacro()
|
|
|
|
macro(set_sources)
|
|
|
|
file(GLOB_RECURSE headers ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
|
|
file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
|
|
|
file(GLOB_RECURSE shared_headers ${test_base_dir}/shared/*.h)
|
|
file(GLOB_RECURSE shared_sources ${test_base_dir}/shared/*.cpp)
|
|
|
|
list(APPEND headers ${shared_headers})
|
|
list(APPEND sources ${shared_sources})
|
|
|
|
file(GLOB_RECURSE mock_headers ${test_base_dir}/mock/*.h)
|
|
file(GLOB_RECURSE mock_sources ${test_base_dir}/mock/*.cpp)
|
|
|
|
list(APPEND headers ${mock_headers})
|
|
list(APPEND sources ${mock_sources})
|
|
|
|
if(ADD_HEADERS_TO_SOURCES)
|
|
list(APPEND sources ${headers})
|
|
endif()
|
|
|
|
if(WIN32)
|
|
list(APPEND sources ${CMAKE_BINARY_DIR}/src/version.rc)
|
|
endif()
|
|
|
|
replace_platform_sources()
|
|
replace_arch_sources()
|
|
|
|
endmacro()
|
|
|
|
macro(replace_platform_sources)
|
|
|
|
set(platform_dir ${CMAKE_CURRENT_SOURCE_DIR}/platform)
|
|
|
|
# Remove platform files so that specific platform files can be added later.
|
|
# This is a bit weird, but it's simpler to include everything, remove all
|
|
# platform files, then only include the platforms we need.
|
|
file(GLOB_RECURSE all_platform_files ${platform_dir}/*)
|
|
list(REMOVE_ITEM headers ${all_platform_files})
|
|
list(REMOVE_ITEM sources ${all_platform_files})
|
|
|
|
if(WIN32)
|
|
file(GLOB platform_sources ${platform_dir}/MSWindows*.cpp)
|
|
file(GLOB platform_headers ${platform_dir}/MSWindows*.h)
|
|
elseif(APPLE)
|
|
file(GLOB platform_sources ${platform_dir}/OSX*.cpp)
|
|
file(GLOB platform_headers ${platform_dir}/OSX*.h)
|
|
elseif(UNIX)
|
|
file(GLOB platform_sources ${platform_dir}/XWindows*.cpp)
|
|
file(GLOB platform_headers ${platform_dir}/XWindows*.h)
|
|
endif()
|
|
|
|
list(APPEND sources ${platform_sources})
|
|
list(APPEND headers ${platform_headers})
|
|
|
|
endmacro()
|
|
|
|
macro(replace_arch_sources)
|
|
|
|
set(arch_dir ${CMAKE_CURRENT_SOURCE_DIR}/arch)
|
|
|
|
# Remove arch files so that specific arch files can be added later.
|
|
# This is a bit weird, but it's simpler to include everything, remove all
|
|
# arch files, then only include the archs we need.
|
|
file(GLOB_RECURSE all_arch_files ${arch_dir}/*)
|
|
list(REMOVE_ITEM headers ${all_arch_files})
|
|
list(REMOVE_ITEM sources ${all_arch_files})
|
|
|
|
if(WIN32)
|
|
file(GLOB arch_sources ${arch_dir}/win32/*.cpp)
|
|
file(GLOB arch_headers ${arch_dir}/win32/*.h)
|
|
elseif(UNIX)
|
|
file(GLOB arch_sources ${arch_dir}/unix/*.cpp)
|
|
file(GLOB arch_headers ${arch_dir}/unix/*.h)
|
|
endif()
|
|
|
|
list(APPEND sources ${arch_sources})
|
|
list(APPEND headers ${arch_headers})
|
|
|
|
endmacro()
|
|
|
|
macro(config_test_deps)
|
|
|
|
# gui library autogen headers:
|
|
# qt doesn't seem to auto include the autogen headers for libraries.
|
|
include_directories(${CMAKE_BINARY_DIR}/src/lib/gui/gui_autogen/include)
|
|
|
|
set(test_libs
|
|
gtest
|
|
gmock
|
|
arch
|
|
base
|
|
client
|
|
server
|
|
io
|
|
net
|
|
platform
|
|
server
|
|
synlib
|
|
mt
|
|
ipc
|
|
license
|
|
gui
|
|
${GTEST_LIBS}
|
|
${libs})
|
|
|
|
endmacro()
|
|
|
|
config_all_tests()
|