# Synergy -- mouse and keyboard sharing utility
# Copyright (C) 2012-2016 Symless Ltd.
# Copyright (C) 2009 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/>.
cmake_minimum_required (VERSION 3.4)
project (synergy-core C CXX)
if (DEFINED ENV{SYNERGY_NO_LEGACY})
option (SYNERGY_BUILD_LEGACY_GUI "Build the legacy GUI" OFF)
option (SYNERGY_BUILD_LEGACY_INSTALLER "Build the legacy installer" OFF)
else()
option (SYNERGY_BUILD_LEGACY_GUI "Build the legacy GUI" ON)
option (SYNERGY_BUILD_LEGACY_INSTALLER "Build the legacy installer" ON)
endif()
if (DEFINED ENV{SYNERGY_NO_TESTS})
option (BUILD_TESTS "Override building of tests" OFF)
else()
option (BUILD_TESTS "Override building of tests" ON)
option (ENABLE_COVERAGE "Build with coverage")
endif()
if (DEFINED ENV{SYNERGY_UNIFIED_CORE})
option (UNIFIED_CORE "Build a single core binary" ON)
else()
option (UNIFIED_CORE "Build a single core binary" OFF)
endif()
if ($ENV{SYNERGY_ENTERPRISE})
option (SYNERGY_ENTERPRISE "Build Enterprise" ON)
else()
option (SYNERGY_ENTERPRISE "Build Enterprise" OFF)
endif()
if ($ENV{SYNERGY_BUSINESS})
option (SYNERGY_BUSINESS "Build Business" ON)
else()
option (SYNERGY_BUSINESS "Build Business" OFF)
endif()
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
if (ENABLE_COVERAGE)
# Add Code Coverage
include(cmake/CodeCoverage.cmake)
append_coverage_compiler_flags()
setup_target_for_coverage_gcovr_xml(
NAME coverage
EXECUTABLE unittests
BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src"
EXCLUDE "ext/*")
endif()
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions (-DNDEBUG)
endif()
#
# Synergy version
#
include (cmake/Version.cmake)
# TODO: Find out why we need these, and remove them
if (COMMAND cmake_policy)
cmake_policy (SET CMP0003 NEW)
cmake_policy (SET CMP0005 NEW)
endif()
# Add headers to source list
if (${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
set (SYNERGY_ADD_HEADERS FALSE)
else()
set (SYNERGY_ADD_HEADERS TRUE)
endif()
set (libs)
include_directories (BEFORE SYSTEM ${PROJECT_SOURCE_DIR}/ext/googletest/googletest/include)
if (UNIX)
if (NOT APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()
# For config.h, detect the libraries, functions, etc.
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckFunctionExists)
include (CheckTypeSize)
include (CheckIncludeFileCXX)
include (CheckSymbolExists)
include (CheckCSourceCompiles)
check_include_file_cxx (istream HAVE_ISTREAM)
check_include_file_cxx (ostream HAVE_OSTREAM)
check_include_file_cxx (sstream HAVE_SSTREAM)
check_include_files (inttypes.h HAVE_INTTYPES_H)
check_include_files (locale.h HAVE_LOCALE_H)
check_include_files (memory.h HAVE_MEMORY_H)
check_include_files (stdlib.h HAVE_STDLIB_H)
check_include_files (strings.h HAVE_STRINGS_H)
check_include_files (string.h HAVE_STRING_H)
check_include_files (sys/select.h HAVE_SYS_SELECT_H)
check_include_files (sys/socket.h HAVE_SYS_SOCKET_H)
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
check_include_files (sys/time.h HAVE_SYS_TIME_H)
check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_files (unistd.h HAVE_UNISTD_H)
check_include_files (wchar.h HAVE_WCHAR_H)
check_function_exists (getpwuid_r HAVE_GETPWUID_R)
check_function_exists (gmtime_r HAVE_GMTIME_R)
check_function_exists (nanosleep HAVE_NANOSLEEP)
check_function_exists (poll HAVE_POLL)
check_function_exists (sigwait HAVE_POSIX_SIGWAIT)
check_function_exists (strftime HAVE_STRFTIME)
check_function_exists (vsnprintf HAVE_VSNPRINTF)
check_function_exists (inet_aton HAVE_INET_ATON)
# For some reason, the check_function_exists macro doesn't detect
# the inet_aton on some pure Unix platforms (e.g. sunos5). So we
# need to do a more detailed check and also include some extra libs.
if (NOT HAVE_INET_ATON)
set (CMAKE_REQUIRED_LIBRARIES nsl)
check_c_source_compiles (
"#include <arpa/inet.h>\n int main() { inet_aton (0, 0); }"
HAVE_INET_ATON_ADV)
set (CMAKE_REQUIRED_LIBRARIES)
if (HAVE_INET_ATON_ADV)
# Override the previous fail.
set (HAVE_INET_ATON 1)
# Assume that both nsl and socket will be needed,
# it seems safe to add socket on the back of nsl,
# since socket only ever needed when nsl is needed.
list (APPEND libs nsl socket)
endif()
endif()
check_type_size (char SIZEOF_CHAR)
check_type_size (int SIZEOF_INT)
check_type_size (long SIZEOF_LONG)
check_type_size (short SIZEOF_SHORT)
# pthread is used on both Linux and Mac
check_library_exists ("pthread" pthread_create "" HAVE_PTHREAD)
if (HAVE_PTHREAD)
list (APPEND libs pthread)
else()
message (FATAL_ERROR "Missing library: pthread")
endif()
if (APPLE)
set (CMAKE_CXX_FLAGS "--sysroot ${CMAKE_OSX_SYSROOT} ${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 11.0)
set(SYNERGY_OSX_DEPLOYMENT_TARGET 1100)
elseif(CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 10.15)
set(SYNERGY_OSX_DEPLOYMENT_TARGET 1015)
elseif(CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 10.14)
set(SYNERGY_OSX_DEPLOYMENT_TARGET 1014)
else()
set(SYNERGY_OSX_DEPLOYMENT_TARGET 1013)
endif()
add_compile_definitions(OSX_DEPLOYMENT_TARGET=${SYNERGY_OSX_DEPLOYMENT_TARGET})
find_library (lib_ScreenSaver ScreenSaver)
find_library (lib_IOKit IOKit)
find_library (lib_ApplicationServices ApplicationServices)
find_library (lib_Foundation Foundation)
find_library (lib_Carbon Carbon)
list (APPEND libs
${lib_ScreenSaver}
${lib_IOKit}
${lib_ApplicationServices}
${lib_Foundation}
${lib_Carbon}
)
if(SYNERGY_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 1014)
find_library (lib_UserNotifications UserNotifications)
list (APPEND libs
${lib_UserNotifications}
)
endif()
else() # not-apple
# add include dir for bsd (posix uses /usr/include/)
set (CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/local/include")
set (XKBlib "X11/Xlib.h;X11/XKBlib.h")
set (CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h")
check_type_size ("XRRNotifyEvent" X11_EXTENSIONS_XRANDR_H)
set (HAVE_X11_EXTENSIONS_XRANDR_H "${X11_EXTENSIONS_XRANDR_H}")
set (CMAKE_EXTRA_INCLUDE_FILES)
check_include_files ("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H)
check_include_files ("X11/extensions/Xinerama.h" HAVE_X11_EXTENSIONS_XINERAMA_H)
check_include_files ("${XKBlib};X11/extensions/XKBstr.h" HAVE_X11_EXTENSIONS_XKBSTR_H)
check_include_files ("X11/extensions/XKB.h" HAVE_XKB_EXTENSION)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Synergy键盘鼠标共享 v1.14.7.9.zip (898个子文件)
ChangeLog 35KB
CodeCoverage.cmake 18KB
Version.cmake 3KB
lang.cmd 117B
langbuild.cmd 26B
compat 2B
synergy.conf 2KB
control 496B
copyright 296B
XWindowsUtil.cpp 83KB
Server.cpp 64KB
MSWindowsScreen.cpp 58KB
XWindowsScreen.cpp 57KB
Config.cpp 54KB
XWindowsClipboard.cpp 47KB
MainWindow.cpp 44KB
MSWindowsKeyState.cpp 44KB
KeyMap.cpp 43KB
KeyState.cpp 40KB
XWindowsKeyState.cpp 32KB
OSXKeyState.cpp 30KB
InputFilter.cpp 29KB
ArchNetworkWinsock.cpp 29KB
MSWindowsDesks.cpp 29KB
ServerProxy.cpp 27KB
Client.cpp 24KB
ServerApp.cpp 24KB
MSWindowsHook.cpp 24KB
ArchNetworkBSD.cpp 24KB
AppConfig.cpp 22KB
MSWindowsWatchdog.cpp 20KB
ArchMultithreadPosix.cpp 20KB
ArchDaemonWindows.cpp 20KB
SecureSocket.cpp 19KB
Unicode.cpp 19KB
ArchMultithreadWindows.cpp 18KB
ProtocolUtilTests.cpp 18KB
SettingsDialog.cpp 17KB
ServerConfig.cpp 17KB
NetworkTests.cpp 17KB
XWindowsScreenSaver.cpp 17KB
ServerConfigDialog.cpp 16KB
ClientApp.cpp 16KB
EventQueue.cpp 16KB
ProtocolUtil.cpp 15KB
TCPSocket.cpp 15KB
KeyStateTests.cpp 14KB
ArgParser.cpp 14KB
ClientProxy1_0.cpp 14KB
ArchTaskBarWindows.cpp 13KB
SecureClientSocket.cpp 13KB
ArchMiscWindows.cpp 12KB
DaemonApp.cpp 12KB
MSWindowsServerTaskBarReceiver.cpp 11KB
InverseClientSocket.cpp 11KB
ClipboardTests.cpp 11KB
MSWindowsClientTaskBarReceiver.cpp 10KB
Screen.cpp 10KB
SocketMultiplexer.cpp 10KB
MSWindowsScreenSaver.cpp 9KB
ClientProxyUnknown.cpp 9KB
ConfigTests.cpp 9KB
OSXUchrKeyResource.cpp 8KB
ClientListener.cpp 8KB
Log.cpp 8KB
XWindowsEventQueueBuffer.cpp 8KB
SerialKeyTests.cpp 8KB
AppUtilWindows.cpp 8KB
key_types.cpp 8KB
App.cpp 8KB
LicenseManager.cpp 8KB
X11LayoutsParser.cpp 7KB
ArgParserTests.cpp 7KB
ConfigWriter.cpp 7KB
X11LayoutParserTests.cpp 7KB
String.cpp 7KB
IpcTests.cpp 7KB
OSXClipboard.cpp 7KB
KeyMapTests.cpp 7KB
XArchWindows.cpp 7KB
NetworkAddress.cpp 7KB
GenericArgsParsingTests.cpp 7KB
MSWindowsClipboard.cpp 7KB
KeySequence.cpp 6KB
AppUtilUnix.cpp 6KB
XWindowsKeyStateTests.cpp 6KB
SslApi.cpp 6KB
OSXScreenSaver.cpp 6KB
IpcClientProxy.cpp 6KB
SslLogger.cpp 6KB
SslCertificate.cpp 6KB
PrimaryClient.cpp 6KB
IpcLogOutputterTests.cpp 6KB
MSWindowsSession.cpp 6KB
XWindowsClipboardAnyBitmapConverter.cpp 6KB
BonjourWindows.cpp 6KB
MSWindowsClipboardTests.cpp 6KB
ScreenSettingsDialog.cpp 6KB
log_outputters.cpp 5KB
ClientArgsParsingTests.cpp 5KB
共 898 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
小小姑娘很大
- 粉丝: 4096
- 资源: 2343
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- SI4947ADY-T1-E3-VB一款SOP8封装2个P-Channel场效应MOS管
- TeeChart ProFS 2023.38 源码版, 本人一直在用,稳定可靠
- python程序设计:数字类型 转换 运算
- doubleball1.m
- 二层半独栋别墅-12.00&10.80米-施工图.dwg
- SI4940DY-T1-E3-VB一款SOP8封装2个N-Channel场效应MOS管
- 端午节相关庆祝代码案例.zip
- SaaS 短链接系统,承载高并发和海量存储等场景难题 专为实习、校招以及社招而出的最新项目,项目质量不亚于12306铁路购票项目
- TeeChart ProFS 2023.38 VCL 试过各种版本,这个应该是最新最全源码的,本人一直在用 稳定运行
- 嵌入式产品开发.xmind
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功