reformatted cmake config files
This commit is contained in:
parent
0aa76fd05f
commit
9dc96ef0a0
|
@ -14,60 +14,60 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Version number for Synergy
|
# Version number for Synergy
|
||||||
SET(VERSION_MAJOR 1)
|
set(VERSION_MAJOR 1)
|
||||||
SET(VERSION_MINOR 5)
|
set(VERSION_MINOR 5)
|
||||||
SET(VERSION_REV 0)
|
set(VERSION_REV 0)
|
||||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
||||||
|
|
||||||
|
|
||||||
# The check for 2.6 may be too strict (consider lowering).
|
# The check for 2.6 may be too strict (consider lowering).
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)
|
cmake_minimum_required(VERSION 2.4.7)
|
||||||
|
|
||||||
# CMake complains if we don't have this.
|
# CMake complains if we don't have this.
|
||||||
IF(COMMAND cmake_policy)
|
if (COMMAND cmake_policy)
|
||||||
CMAKE_POLICY(SET CMP0003 NEW)
|
CMAKE_POLICY(SET CMP0003 NEW)
|
||||||
ENDIF(COMMAND cmake_policy)
|
endif()
|
||||||
|
|
||||||
# We're escaping quotes in the Windows version number, because
|
# We're escaping quotes in the Windows version number, because
|
||||||
# for some reason CMake won't do it at config version 2.4.7
|
# for some reason CMake won't do it at config version 2.4.7
|
||||||
# It seems that this restores the newer behaviour where define
|
# It seems that this restores the newer behaviour where define
|
||||||
# args are not auto-escaped.
|
# args are not auto-escaped.
|
||||||
IF(COMMAND cmake_policy)
|
if (COMMAND cmake_policy)
|
||||||
CMAKE_POLICY(SET CMP0005 NEW)
|
CMAKE_POLICY(SET CMP0005 NEW)
|
||||||
ENDIF(COMMAND cmake_policy)
|
endif()
|
||||||
|
|
||||||
# First, declare project (important for prerequisite checks).
|
# First, declare project (important for prerequisite checks).
|
||||||
PROJECT(synergy C CXX)
|
project(synergy C CXX)
|
||||||
|
|
||||||
# Set some easy to type variables.
|
# Set some easy to type variables.
|
||||||
SET(root_dir ${CMAKE_SOURCE_DIR})
|
set(root_dir ${CMAKE_SOURCE_DIR})
|
||||||
SET(cmake_dir ${root_dir}/cmake)
|
set(cmake_dir ${root_dir}/cmake)
|
||||||
SET(bin_dir ${root_dir}/bin)
|
set(bin_dir ${root_dir}/bin)
|
||||||
SET(doc_dir ${root_dir}/doc)
|
set(doc_dir ${root_dir}/doc)
|
||||||
SET(doc_dir ${root_dir}/doc)
|
set(doc_dir ${root_dir}/doc)
|
||||||
|
|
||||||
# Now for the stuff to generate config.h (and setup defines).
|
# Now for the stuff to generate config.h (and setup defines).
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_config.txt)
|
include(${cmake_dir}/CMakeLists_config.txt)
|
||||||
|
|
||||||
# Now for all the executables and libraries.
|
# Now for all the executables and libraries.
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_lib.txt)
|
include(${cmake_dir}/CMakeLists_lib.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_synergyc.txt)
|
include(${cmake_dir}/CMakeLists_synergyc.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_synergys.txt)
|
include(${cmake_dir}/CMakeLists_synergys.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_launcher.txt)
|
include(${cmake_dir}/CMakeLists_launcher.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_gtest.txt)
|
include(${cmake_dir}/CMakeLists_gtest.txt)
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_test.txt)
|
include(${cmake_dir}/CMakeLists_test.txt)
|
||||||
|
|
||||||
if (CONF_CPACK)
|
if (CONF_CPACK)
|
||||||
# Setup the CPack config.
|
# Setup the CPack config.
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_cpack.txt)
|
include(${cmake_dir}/CMakeLists_cpack.txt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CONF_DOXYGEN)
|
if (CONF_DOXYGEN)
|
||||||
# Setup doxygen
|
# Setup doxygen
|
||||||
INCLUDE(${cmake_dir}/CMakeLists_doxygen.txt)
|
include(${cmake_dir}/CMakeLists_doxygen.txt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF(WIN32)
|
if (WIN32)
|
||||||
# add /analyze in order to unconver potential bugs in the source code
|
# add /analyze in order to unconver potential bugs in the source code
|
||||||
# Details: http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
|
# Details: http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
|
||||||
# add /FR to generate browse information (ncb files) usefull for using IDE
|
# add /FR to generate browse information (ncb files) usefull for using IDE
|
||||||
|
@ -83,17 +83,16 @@ IF(WIN32)
|
||||||
# added _SECURE_SCL=1 for finding bugs with iterators - http://msdn.microsoft.com/en-us/library/aa985965.aspx
|
# added _SECURE_SCL=1 for finding bugs with iterators - http://msdn.microsoft.com/en-us/library/aa985965.aspx
|
||||||
|
|
||||||
# common args between all vs builds
|
# common args between all vs builds
|
||||||
SET(VS_ARGS "/FR /MP /D _BIND_TO_CURRENT_VCLIBS_VERSION=1 /D _SECURE_SCL=1 ${VS_ARGS_EXTRA}")
|
set(VS_ARGS "/FR /MP /D _BIND_TO_CURRENT_VCLIBS_VERSION=1 /D _SECURE_SCL=1 ${VS_ARGS_EXTRA}")
|
||||||
|
|
||||||
# we may use `cmake -D VS_ARGS_EXTRA="/analyze"` for example to specify
|
# we may use `cmake -D VS_ARGS_EXTRA="/analyze"` for example to specify
|
||||||
# analyze mode (since we don't always want to use it; e.g. on non-team
|
# analyze mode (since we don't always want to use it; e.g. on non-team
|
||||||
# or non-x86 compiler editions where there's no support)
|
# or non-x86 compiler editions where there's no support)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VS_ARGS}")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VS_ARGS}")
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VS_ARGS}")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VS_ARGS}")
|
||||||
|
|
||||||
# this line removes "/D NDEBUG" from release, we want them in order to
|
# this line removes "/D NDEBUG" from release, we want them in order to
|
||||||
# find bugs even on release builds.
|
# find bugs even on release builds.
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2")
|
set(CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2")
|
||||||
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
|
@ -16,106 +16,98 @@
|
||||||
# Declare libs, so we can use list in linker later. There's probably
|
# Declare libs, so we can use list in linker later. There's probably
|
||||||
# a more elegant way of doing this; with SCons, when you check for the
|
# a more elegant way of doing this; with SCons, when you check for the
|
||||||
# lib, it is automatically passed to the linker.
|
# lib, it is automatically passed to the linker.
|
||||||
SET(libs)
|
set(libs)
|
||||||
|
|
||||||
# Depending on the platform, pass in the required defines.
|
# Depending on the platform, pass in the required defines.
|
||||||
IF(UNIX)
|
if (UNIX)
|
||||||
|
|
||||||
# For config.h, detect the libraries, functions, etc.
|
# For config.h, detect the libraries, functions, etc.
|
||||||
INCLUDE(CheckIncludeFiles)
|
include(CheckIncludeFiles)
|
||||||
INCLUDE(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
INCLUDE(CheckFunctionExists)
|
include(CheckFunctionExists)
|
||||||
INCLUDE(CheckTypeSize)
|
include(CheckTypeSize)
|
||||||
INCLUDE(CheckIncludeFileCXX)
|
include(CheckIncludeFileCXX)
|
||||||
INCLUDE(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
INCLUDE(CheckCSourceCompiles)
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
CHECK_INCLUDE_FILE_CXX(istream HAVE_ISTREAM)
|
check_include_file_cxx(istream HAVE_ISTREAM)
|
||||||
CHECK_INCLUDE_FILE_CXX(ostream HAVE_OSTREAM)
|
check_include_file_cxx(ostream HAVE_OSTREAM)
|
||||||
CHECK_INCLUDE_FILE_CXX(sstream HAVE_SSTREAM)
|
check_include_file_cxx(sstream HAVE_SSTREAM)
|
||||||
|
|
||||||
CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
|
check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||||
CHECK_INCLUDE_FILES(locale.h HAVE_LOCALE_H)
|
check_include_files(locale.h HAVE_LOCALE_H)
|
||||||
CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)
|
check_include_files(memory.h HAVE_MEMORY_H)
|
||||||
CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)
|
check_include_files(stdlib.h HAVE_STDLIB_H)
|
||||||
CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
|
check_include_files(strings.h HAVE_STRINGS_H)
|
||||||
CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)
|
check_include_files(string.h HAVE_STRING_H)
|
||||||
CHECK_INCLUDE_FILES(sys/select.h HAVE_SYS_SELECT_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/socket.h HAVE_SYS_SOCKET_H)
|
||||||
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_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/time.h HAVE_SYS_TIME_H)
|
||||||
CHECK_INCLUDE_FILES(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||||
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
|
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||||
CHECK_INCLUDE_FILES(wchar.h HAVE_WCHAR_H)
|
check_include_files(wchar.h HAVE_WCHAR_H)
|
||||||
|
|
||||||
CHECK_FUNCTION_EXISTS(getpwuid_r HAVE_GETPWUID_R)
|
check_function_exists(getpwuid_r HAVE_GETPWUID_R)
|
||||||
CHECK_FUNCTION_EXISTS(gmtime_r HAVE_GMTIME_R)
|
check_function_exists(gmtime_r HAVE_GMTIME_R)
|
||||||
CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
|
check_function_exists(nanosleep HAVE_NANOSLEEP)
|
||||||
CHECK_FUNCTION_EXISTS(poll HAVE_POLL)
|
check_function_exists(poll HAVE_POLL)
|
||||||
CHECK_FUNCTION_EXISTS(sigwait HAVE_POSIX_SIGWAIT)
|
check_function_exists(sigwait HAVE_POSIX_SIGWAIT)
|
||||||
CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME)
|
check_function_exists(strftime HAVE_STRFTIME)
|
||||||
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
|
check_function_exists(vsnprintf HAVE_VSNPRINTF)
|
||||||
CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON)
|
check_function_exists(inet_aton HAVE_INET_ATON)
|
||||||
|
|
||||||
# For some reason, the CHECK_FUNCTION_EXISTS macro doesn't detect
|
# For some reason, the check_function_exists macro doesn't detect
|
||||||
# the inet_aton on some pure Unix platforms (e.g. sunos5). So we
|
# 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.
|
# need to do a more detailed check and also include some extra libs.
|
||||||
IF(NOT HAVE_INET_ATON)
|
if (NOT HAVE_INET_ATON)
|
||||||
|
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES nsl)
|
set(CMAKE_REQUIRED_LIBRARIES nsl)
|
||||||
CHECK_C_SOURCE_COMPILES(
|
check_c_source_compiles(
|
||||||
"#include <arpa/inet.h>\n int main() { inet_aton(0, 0); }"
|
"#include <arpa/inet.h>\n int main() { inet_aton(0, 0); }"
|
||||||
HAVE_INET_ATON_ADV)
|
HAVE_INET_ATON_ADV)
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
IF(HAVE_INET_ATON_ADV)
|
if (HAVE_INET_ATON_ADV)
|
||||||
|
|
||||||
# Override the previous fail.
|
# Override the previous fail.
|
||||||
SET(HAVE_INET_ATON 1)
|
set(HAVE_INET_ATON 1)
|
||||||
|
|
||||||
# Assume that both nsl and socket will be needed,
|
# Assume that both nsl and socket will be needed,
|
||||||
# it seems safe to add socket on the back of nsl,
|
# it seems safe to add socket on the back of nsl,
|
||||||
# since socket only ever needed when nsl is needed.
|
# since socket only ever needed when nsl is needed.
|
||||||
LIST(APPEND libs nsl socket)
|
list(APPEND libs nsl socket)
|
||||||
|
|
||||||
ENDIF(HAVE_INET_ATON_ADV)
|
endif()
|
||||||
|
|
||||||
ENDIF(NOT HAVE_INET_ATON)
|
endif()
|
||||||
|
|
||||||
CHECK_TYPE_SIZE(char SIZEOF_CHAR)
|
check_type_size(char SIZEOF_CHAR)
|
||||||
CHECK_TYPE_SIZE(int SIZEOF_INT)
|
check_type_size(int SIZEOF_INT)
|
||||||
CHECK_TYPE_SIZE(long SIZEOF_LONG)
|
check_type_size(long SIZEOF_LONG)
|
||||||
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
|
check_type_size(short SIZEOF_SHORT)
|
||||||
|
|
||||||
# pthread is used on both Linux and Mac
|
# pthread is used on both Linux and Mac
|
||||||
CHECK_LIBRARY_EXISTS("pthread" pthread_create "" HAVE_PTHREAD)
|
check_library_exists("pthread" pthread_create "" HAVE_PTHREAD)
|
||||||
IF(HAVE_PTHREAD)
|
if (HAVE_PTHREAD)
|
||||||
LIST(APPEND libs pthread)
|
list(APPEND libs pthread)
|
||||||
ELSE(HAVE_PTHREAD)
|
else (HAVE_PTHREAD)
|
||||||
MESSAGE(FATAL_ERROR "Missing library: pthread")
|
message(FATAL_ERROR "Missing library: pthread")
|
||||||
ENDIF(HAVE_PTHREAD)
|
endif()
|
||||||
|
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
|
|
||||||
# build mac os x universal
|
# build mac os x universal
|
||||||
set(CMAKE_OSX_ARCHITECTURES "ppc;i386"
|
set(CMAKE_OSX_ARCHITECTURES "ppc;i386"
|
||||||
CACHE STRING "Build architectures for OSX" FORCE)
|
CACHE STRING "Build architectures for OSX" FORCE)
|
||||||
|
|
||||||
# TODO: fix 64-bit failures
|
find_library(lib_ScreenSaver ScreenSaver)
|
||||||
#set(CMAKE_OSX_ARCHITECTURES "ppc;i386;ppc64;x86_64"
|
find_library(lib_IOKit IOKit)
|
||||||
# CACHE STRING "Build architectures for OSX" FORCE)
|
find_library(lib_ApplicationServices ApplicationServices)
|
||||||
|
find_library(lib_Foundation Foundation)
|
||||||
|
find_library(lib_Carbon Carbon)
|
||||||
|
|
||||||
# not sure this is a good idea
|
list(APPEND libs
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5"
|
|
||||||
# CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
|
||||||
|
|
||||||
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_ScreenSaver}
|
||||||
${lib_IOKit}
|
${lib_IOKit}
|
||||||
${lib_ApplicationServices}
|
${lib_ApplicationServices}
|
||||||
|
@ -123,100 +115,100 @@ IF(UNIX)
|
||||||
${lib_Carbon}
|
${lib_Carbon}
|
||||||
)
|
)
|
||||||
|
|
||||||
ELSE(APPLE)
|
else (APPLE)
|
||||||
|
|
||||||
SET(XKBlib "X11/XKBlib.h")
|
set(XKBlib "X11/XKBlib.h")
|
||||||
CHECK_INCLUDE_FILES("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H)
|
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("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("${XKBlib};X11/extensions/XKBstr.h" HAVE_X11_EXTENSIONS_XKBSTR_H)
|
||||||
CHECK_INCLUDE_FILES("X11/extensions/XKB.h" HAVE_XKB_EXTENSION)
|
check_include_files("X11/extensions/XKB.h" HAVE_XKB_EXTENSION)
|
||||||
CHECK_INCLUDE_FILES("X11/extensions/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H)
|
check_include_files("X11/extensions/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H)
|
||||||
CHECK_INCLUDE_FILES(${XKBlib} HAVE_X11_XKBLIB_H)
|
check_include_files(${XKBlib} HAVE_X11_XKBLIB_H)
|
||||||
|
|
||||||
IF(HAVE_X11_EXTENSIONS_DPMS_H)
|
if (HAVE_X11_EXTENSIONS_DPMS_H)
|
||||||
# Assume that function prototypes declared, when include exists.
|
# Assume that function prototypes declared, when include exists.
|
||||||
SET(HAVE_DPMS_PROTOTYPES 1)
|
set(HAVE_DPMS_PROTOTYPES 1)
|
||||||
ENDIF(HAVE_X11_EXTENSIONS_DPMS_H)
|
endif()
|
||||||
|
|
||||||
IF(NOT HAVE_X11_XKBLIB_H)
|
if (NOT HAVE_X11_XKBLIB_H)
|
||||||
MESSAGE(FATAL_ERROR "Missing header: " ${XKBlib})
|
message(FATAL_ERROR "Missing header: " ${XKBlib})
|
||||||
ENDIF(NOT HAVE_X11_XKBLIB_H)
|
endif()
|
||||||
|
|
||||||
CHECK_LIBRARY_EXISTS("SM;ICE" IceConnectionNumber "" HAVE_ICE)
|
check_library_exists("SM;ICE" IceConnectionNumber "" HAVE_ICE)
|
||||||
CHECK_LIBRARY_EXISTS("X11;Xext" DPMSQueryExtension "" HAVE_Xext)
|
check_library_exists("X11;Xext" DPMSQueryExtension "" HAVE_Xext)
|
||||||
CHECK_LIBRARY_EXISTS("X11;Xext;Xtst" XTestQueryExtension "" HAVE_Xtst)
|
check_library_exists("X11;Xext;Xtst" XTestQueryExtension "" HAVE_Xtst)
|
||||||
CHECK_LIBRARY_EXISTS("Xinerama" XineramaQueryExtension "" HAVE_Xinerama)
|
check_library_exists("Xinerama" XineramaQueryExtension "" HAVE_Xinerama)
|
||||||
|
|
||||||
IF(HAVE_ICE)
|
if (HAVE_ICE)
|
||||||
|
|
||||||
# Assume we have SM if we have ICE.
|
# Assume we have SM if we have ICE.
|
||||||
SET(HAVE_SM 1)
|
set(HAVE_SM 1)
|
||||||
LIST(APPEND libs SM ICE)
|
list(APPEND libs SM ICE)
|
||||||
|
|
||||||
ENDIF(HAVE_ICE)
|
endif()
|
||||||
|
|
||||||
IF(HAVE_Xtst)
|
if (HAVE_Xtst)
|
||||||
|
|
||||||
# Xtxt depends on X11.
|
# Xtxt depends on X11.
|
||||||
SET(HAVE_X11)
|
set(HAVE_X11)
|
||||||
LIST(APPEND libs X11 Xtst)
|
list(APPEND libs X11 Xtst)
|
||||||
|
|
||||||
ELSE(HAVE_Xtst)
|
else (HAVE_Xtst)
|
||||||
|
|
||||||
MESSAGE(FATAL_ERROR "Missing library: Xtst")
|
message(FATAL_ERROR "Missing library: Xtst")
|
||||||
|
|
||||||
ENDIF(HAVE_Xtst)
|
endif()
|
||||||
|
|
||||||
IF(HAVE_Xext)
|
if (HAVE_Xext)
|
||||||
LIST(APPEND libs Xext)
|
list(APPEND libs Xext)
|
||||||
ENDIF(HAVE_Xext)
|
endif()
|
||||||
|
|
||||||
IF(HAVE_Xinerama)
|
if (HAVE_Xinerama)
|
||||||
LIST(APPEND libs Xinerama)
|
list(APPEND libs Xinerama)
|
||||||
ELSE(HAVE_Xinerama)
|
else (HAVE_Xinerama)
|
||||||
IF(HAVE_X11_EXTENSIONS_XINERAMA_H)
|
if (HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||||
MESSAGE(FATAL_ERROR "Missing library: Xinerama")
|
message(FATAL_ERROR "Missing library: Xinerama")
|
||||||
ENDIF(HAVE_X11_EXTENSIONS_XINERAMA_H)
|
endif()
|
||||||
ENDIF(HAVE_Xinerama)
|
endif()
|
||||||
|
|
||||||
ENDIF(APPLE)
|
endif()
|
||||||
|
|
||||||
# For config.h, set some static values; it may be a good idea to make
|
# For config.h, set some static values; it may be a good idea to make
|
||||||
# these values dynamic for non-standard UNIX compilers.
|
# these values dynamic for non-standard UNIX compilers.
|
||||||
SET(ACCEPT_TYPE_ARG3 socklen_t)
|
set(ACCEPT_TYPE_ARG3 socklen_t)
|
||||||
SET(HAVE_CXX_BOOL 1)
|
set(HAVE_CXX_BOOL 1)
|
||||||
SET(HAVE_CXX_CASTS 1)
|
set(HAVE_CXX_CASTS 1)
|
||||||
SET(HAVE_CXX_EXCEPTIONS 1)
|
set(HAVE_CXX_EXCEPTIONS 1)
|
||||||
SET(HAVE_CXX_MUTABLE 1)
|
set(HAVE_CXX_MUTABLE 1)
|
||||||
SET(HAVE_CXX_STDLIB 1)
|
set(HAVE_CXX_STDLIB 1)
|
||||||
SET(HAVE_PTHREAD_SIGNAL 1)
|
set(HAVE_PTHREAD_SIGNAL 1)
|
||||||
SET(SELECT_TYPE_ARG1 int)
|
set(SELECT_TYPE_ARG1 int)
|
||||||
SET(SELECT_TYPE_ARG234 "(fd_set *)")
|
set(SELECT_TYPE_ARG234 "(fd_set *)")
|
||||||
SET(SELECT_TYPE_ARG5 "(struct timeval *)")
|
set(SELECT_TYPE_ARG5 "(struct timeval *)")
|
||||||
SET(STDC_HEADERS 1)
|
set(STDC_HEADERS 1)
|
||||||
SET(TIME_WITH_SYS_TIME 1)
|
set(TIME_WITH_SYS_TIME 1)
|
||||||
SET(HAVE_SOCKLEN_T 1)
|
set(HAVE_SOCKLEN_T 1)
|
||||||
|
|
||||||
# For config.h, save the results based on a template (config.h.in).
|
# For config.h, save the results based on a template (config.h.in).
|
||||||
CONFIGURE_FILE(${cmake_dir}/config.h.in ${root_dir}/config.h)
|
configure_file(${cmake_dir}/config.h.in ${root_dir}/config.h)
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
||||||
|
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
ADD_DEFINITIONS(-DWINAPI_CARBON=1 -D_THREAD_SAFE -DMACOSX_DEPLOYMENT_TARGET=10.4)
|
add_definitions(-DWINAPI_CARBON=1 -D_THREAD_SAFE -DMACOSX_DEPLOYMENT_TARGET=10.4)
|
||||||
ELSE(APPLE)
|
else (APPLE)
|
||||||
ADD_DEFINITIONS(-DWINAPI_XWINDOWS=1)
|
add_definitions(-DWINAPI_XWINDOWS=1)
|
||||||
ENDIF(APPLE)
|
endif()
|
||||||
|
|
||||||
ELSE(UNIX)
|
else (UNIX)
|
||||||
|
|
||||||
LIST(APPEND libs Wtsapi32 Userenv)
|
list(APPEND libs Wtsapi32 Userenv)
|
||||||
|
|
||||||
ADD_DEFINITIONS(
|
add_definitions(
|
||||||
/DWIN32
|
/DWIN32
|
||||||
/D_WINDOWS
|
/D_WINDOWS
|
||||||
/D_CRT_SECURE_NO_WARNINGS
|
/D_CRT_SECURE_NO_WARNINGS
|
||||||
/DVERSION=\"${VERSION}\"
|
/DVERSION=\"${VERSION}\"
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(UNIX)
|
endif()
|
||||||
|
|
|
@ -48,33 +48,33 @@ endif()
|
||||||
# The default CPack behaviour is not to append the system processor
|
# The default CPack behaviour is not to append the system processor
|
||||||
# type, which is undesirable in our case, since we want to support
|
# type, which is undesirable in our case, since we want to support
|
||||||
# both 32-bit and 64-bit processors.
|
# both 32-bit and 64-bit processors.
|
||||||
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
||||||
|
|
||||||
# For source code, use .tar.gz on Unix, and .zip on Windows
|
# For source code, use .tar.gz on Unix, and .zip on Windows
|
||||||
IF(UNIX)
|
if (UNIX)
|
||||||
SET(CPACK_SOURCE_GENERATOR TGZ)
|
set(CPACK_SOURCE_GENERATOR TGZ)
|
||||||
ELSE(UNIX)
|
else (UNIX)
|
||||||
SET(CPACK_SOURCE_GENERATOR ZIP)
|
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||||
ENDIF(UNIX)
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(CPACK_SYSTEM_NAME "MacOSX-Universal")
|
set(CPACK_SYSTEM_NAME "MacOSX-Universal")
|
||||||
endif(APPLE)
|
endif()
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_NAME "synergy")
|
set(CPACK_PACKAGE_NAME "synergy")
|
||||||
SET(CPACK_PACKAGE_VENDOR "The Synergy Project")
|
set(CPACK_PACKAGE_VENDOR "The Synergy Project")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Synergy server and client")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Synergy server and client")
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV})
|
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV})
|
||||||
SET(CPACK_PACKAGE_VERSION ${VERSION})
|
set(CPACK_PACKAGE_VERSION ${VERSION})
|
||||||
SET(CPACK_PACKAGE_CONTACT http://synergy-foss.org/)
|
set(CPACK_PACKAGE_CONTACT http://synergy-foss.org/)
|
||||||
SET(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf")
|
set(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf")
|
||||||
SET(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
|
set(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
|
||||||
|
|
||||||
# files to exclude from src package (regex patterns)
|
# files to exclude from src package (regex patterns)
|
||||||
# to escape, use 4 backslashes (\\\\) -- yuck!
|
# to escape, use 4 backslashes (\\\\) -- yuck!
|
||||||
SET(CPACK_SOURCE_IGNORE_FILES
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
# temp output dir in root
|
# temp output dir in root
|
||||||
"/bin/"
|
"/bin/"
|
||||||
|
|
||||||
|
@ -104,4 +104,4 @@ SET(CPACK_SOURCE_IGNORE_FILES
|
||||||
)
|
)
|
||||||
|
|
||||||
# Must be last (since it relies of CPACK_ vars).
|
# Must be last (since it relies of CPACK_ vars).
|
||||||
INCLUDE(CPack)
|
include(CPack)
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(VERSION, "${VERSION}")
|
set(VERSION, "${VERSION}")
|
||||||
|
|
||||||
# For doxygen.cfg, save the results based on a template (doxygen.cfg.in).
|
# For doxygen.cfg, save the results based on a template (doxygen.cfg.in).
|
||||||
CONFIGURE_FILE(${cmake_dir}/doxygen.cfg.in ${doc_dir}/doxygen.cfg)
|
configure_file(${cmake_dir}/doxygen.cfg.in ${doc_dir}/doxygen.cfg)
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(inc_gtest_dirs
|
set(inc_gtest_dirs
|
||||||
${root_dir}/tools/gtest
|
${root_dir}/tools/gtest
|
||||||
${root_dir}/tools/gtest/include
|
${root_dir}/tools/gtest/include
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_gtest_dirs})
|
include_directories(${inc_gtest_dirs})
|
||||||
ADD_LIBRARY(gtest STATIC ${root_dir}/tools/gtest/src/gtest-all.cc)
|
add_library(gtest STATIC ${root_dir}/tools/gtest/src/gtest-all.cc)
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
IF(WIN32)
|
if (WIN32)
|
||||||
SET(root_cmd_launcher ${root_dir}/cmd/launcher)
|
set(root_cmd_launcher ${root_dir}/cmd/launcher)
|
||||||
|
|
||||||
SET(src_cmd_launcher_mswindows
|
set(src_cmd_launcher_mswindows
|
||||||
${root_cmd_launcher}/CAddScreen.cpp
|
${root_cmd_launcher}/CAddScreen.cpp
|
||||||
${root_cmd_launcher}/CAdvancedOptions.cpp
|
${root_cmd_launcher}/CAdvancedOptions.cpp
|
||||||
${root_cmd_launcher}/CAutoStart.cpp
|
${root_cmd_launcher}/CAutoStart.cpp
|
||||||
|
@ -28,7 +28,7 @@ IF(WIN32)
|
||||||
${root_cmd_launcher}/launcher.cpp
|
${root_cmd_launcher}/launcher.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_cmd_launcher_mswindows
|
set(inc_cmd_launcher_mswindows
|
||||||
${root_cmd_launcher}/CAddScreen.h
|
${root_cmd_launcher}/CAddScreen.h
|
||||||
${root_cmd_launcher}/CAdvancedOptions.h
|
${root_cmd_launcher}/CAdvancedOptions.h
|
||||||
${root_cmd_launcher}/CAutoStart.h
|
${root_cmd_launcher}/CAutoStart.h
|
||||||
|
@ -40,30 +40,30 @@ IF(WIN32)
|
||||||
${root_cmd_launcher}/resource.h
|
${root_cmd_launcher}/resource.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(res_cmd_launcher_mswindows
|
set(res_cmd_launcher_mswindows
|
||||||
${root_cmd_launcher}/launcher.rc
|
${root_cmd_launcher}/launcher.rc
|
||||||
${root_cmd_launcher}/synergy.ico
|
${root_cmd_launcher}/synergy.ico
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_launcher)
|
set(src_cmd_launcher)
|
||||||
|
|
||||||
IF(UNIX)
|
if (UNIX)
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_carbon})
|
list(APPEND src_cmd_launcher ${src_cmd_launcher_carbon})
|
||||||
ELSE(APPLE)
|
else (APPLE)
|
||||||
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_xwindows})
|
list(APPEND src_cmd_launcher ${src_cmd_launcher_xwindows})
|
||||||
ENDIF(APPLE)
|
endif()
|
||||||
ENDIF(UNIX)
|
endif()
|
||||||
|
|
||||||
IF(WIN32)
|
if (WIN32)
|
||||||
LIST(APPEND src_cmd_launcher
|
list(APPEND src_cmd_launcher
|
||||||
${inc_cmd_launcher_mswindows}
|
${inc_cmd_launcher_mswindows}
|
||||||
${res_cmd_launcher_mswindows}
|
${res_cmd_launcher_mswindows}
|
||||||
${src_cmd_launcher_mswindows}
|
${src_cmd_launcher_mswindows}
|
||||||
)
|
)
|
||||||
ENDIF(WIN32)
|
endif()
|
||||||
|
|
||||||
SET(inc_dirs_cmd_launcher
|
set(inc_dirs_cmd_launcher
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib
|
${root_dir}/lib
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
|
@ -77,8 +77,8 @@ IF(WIN32)
|
||||||
${root_dir}/lib/server
|
${root_dir}/lib/server
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_launcher})
|
include_directories(${inc_dirs_cmd_launcher})
|
||||||
ADD_EXECUTABLE(launcher WIN32 ${src_cmd_launcher})
|
add_executable(launcher WIN32 ${src_cmd_launcher})
|
||||||
TARGET_LINK_LIBRARIES(launcher synergy ${libs})
|
target_link_libraries(launcher synergy ${libs})
|
||||||
|
|
||||||
ENDIF(WIN32)
|
endif()
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(root_lib ${root_dir}/lib)
|
set(root_lib ${root_dir}/lib)
|
||||||
|
|
||||||
SET(src_lib_arch
|
set(src_lib_arch
|
||||||
${root_lib}/arch/CArchAppUtil.cpp
|
${root_lib}/arch/CArchAppUtil.cpp
|
||||||
${root_lib}/arch/CArch.cpp
|
${root_lib}/arch/CArch.cpp
|
||||||
${root_lib}/arch/CArchDaemonNone.cpp
|
${root_lib}/arch/CArchDaemonNone.cpp
|
||||||
|
@ -23,7 +23,7 @@ SET(src_lib_arch
|
||||||
${root_lib}/arch/CArchConsoleStd.cpp
|
${root_lib}/arch/CArchConsoleStd.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_arch_unix
|
set(src_lib_arch_unix
|
||||||
${root_lib}/arch/CArchAppUtilUnix.cpp
|
${root_lib}/arch/CArchAppUtilUnix.cpp
|
||||||
${root_lib}/arch/CArchConsoleUnix.cpp
|
${root_lib}/arch/CArchConsoleUnix.cpp
|
||||||
${root_lib}/arch/CArchDaemonUnix.cpp
|
${root_lib}/arch/CArchDaemonUnix.cpp
|
||||||
|
@ -39,7 +39,7 @@ SET(src_lib_arch_unix
|
||||||
${root_lib}/arch/XArchUnix.cpp
|
${root_lib}/arch/XArchUnix.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_arch_windows
|
set(src_lib_arch_windows
|
||||||
${root_lib}/arch/CArchAppUtilWindows.cpp
|
${root_lib}/arch/CArchAppUtilWindows.cpp
|
||||||
${root_lib}/arch/CArchConsoleWindows.cpp
|
${root_lib}/arch/CArchConsoleWindows.cpp
|
||||||
${root_lib}/arch/CArchDaemonWindows.cpp
|
${root_lib}/arch/CArchDaemonWindows.cpp
|
||||||
|
@ -56,7 +56,7 @@ SET(src_lib_arch_windows
|
||||||
${root_lib}/arch/XArchWindows.cpp
|
${root_lib}/arch/XArchWindows.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_arch_windows
|
set(inc_lib_arch_windows
|
||||||
${root_lib}/arch/CArchAppUtil.h
|
${root_lib}/arch/CArchAppUtil.h
|
||||||
${root_lib}/arch/CArchAppUtilWindows.h
|
${root_lib}/arch/CArchAppUtilWindows.h
|
||||||
${root_lib}/arch/CArchConsoleWindows.h
|
${root_lib}/arch/CArchConsoleWindows.h
|
||||||
|
@ -76,7 +76,7 @@ SET(inc_lib_arch_windows
|
||||||
${root_lib}/arch/XArchWindows.h
|
${root_lib}/arch/XArchWindows.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_base
|
set(src_lib_base
|
||||||
${root_lib}/base/CEvent.cpp
|
${root_lib}/base/CEvent.cpp
|
||||||
${root_lib}/base/CEventQueue.cpp
|
${root_lib}/base/CEventQueue.cpp
|
||||||
${root_lib}/base/CFunctionEventJob.cpp
|
${root_lib}/base/CFunctionEventJob.cpp
|
||||||
|
@ -91,7 +91,7 @@ SET(src_lib_base
|
||||||
${root_lib}/base/XBase.cpp
|
${root_lib}/base/XBase.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_base
|
set(inc_lib_base
|
||||||
${root_lib}/base/CEvent.h
|
${root_lib}/base/CEvent.h
|
||||||
${root_lib}/base/CEventQueue.h
|
${root_lib}/base/CEventQueue.h
|
||||||
${root_lib}/base/CFunctionEventJob.h
|
${root_lib}/base/CFunctionEventJob.h
|
||||||
|
@ -114,32 +114,32 @@ SET(inc_lib_base
|
||||||
${root_lib}/base/XBase.h
|
${root_lib}/base/XBase.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_client
|
set(src_lib_client
|
||||||
${root_lib}/client/CClient.cpp
|
${root_lib}/client/CClient.cpp
|
||||||
${root_lib}/client/CServerProxy.cpp
|
${root_lib}/client/CServerProxy.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_client
|
set(inc_lib_client
|
||||||
${root_lib}/client/CClient.h
|
${root_lib}/client/CClient.h
|
||||||
${root_lib}/client/CServerProxy.h
|
${root_lib}/client/CServerProxy.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_common
|
set(src_lib_common
|
||||||
${root_lib}/common/Version.cpp
|
${root_lib}/common/Version.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_common
|
set(inc_lib_common
|
||||||
${root_lib}/common/Version.h
|
${root_lib}/common/Version.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_io
|
set(src_lib_io
|
||||||
${root_lib}/io/CStreamBuffer.cpp
|
${root_lib}/io/CStreamBuffer.cpp
|
||||||
${root_lib}/io/CStreamFilter.cpp
|
${root_lib}/io/CStreamFilter.cpp
|
||||||
${root_lib}/io/IStream.cpp
|
${root_lib}/io/IStream.cpp
|
||||||
${root_lib}/io/XIO.cpp
|
${root_lib}/io/XIO.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_io
|
set(inc_lib_io
|
||||||
${root_lib}/io/CStreamBuffer.h
|
${root_lib}/io/CStreamBuffer.h
|
||||||
${root_lib}/io/CStreamFilter.h
|
${root_lib}/io/CStreamFilter.h
|
||||||
${root_lib}/io/IStream.h
|
${root_lib}/io/IStream.h
|
||||||
|
@ -147,7 +147,7 @@ SET(inc_lib_io
|
||||||
${root_lib}/io/XIO.h
|
${root_lib}/io/XIO.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_mt
|
set(src_lib_mt
|
||||||
${root_lib}/mt/CCondVar.cpp
|
${root_lib}/mt/CCondVar.cpp
|
||||||
${root_lib}/mt/CLock.cpp
|
${root_lib}/mt/CLock.cpp
|
||||||
${root_lib}/mt/CMutex.cpp
|
${root_lib}/mt/CMutex.cpp
|
||||||
|
@ -155,7 +155,7 @@ SET(src_lib_mt
|
||||||
${root_lib}/mt/XMT.cpp
|
${root_lib}/mt/XMT.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_mt
|
set(inc_lib_mt
|
||||||
${root_lib}/mt/CCondVar.h
|
${root_lib}/mt/CCondVar.h
|
||||||
${root_lib}/mt/CLock.h
|
${root_lib}/mt/CLock.h
|
||||||
${root_lib}/mt/CMutex.h
|
${root_lib}/mt/CMutex.h
|
||||||
|
@ -164,7 +164,7 @@ SET(inc_lib_mt
|
||||||
${root_lib}/mt/XThread.h
|
${root_lib}/mt/XThread.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_net
|
set(src_lib_net
|
||||||
${root_lib}/net/CNetworkAddress.cpp
|
${root_lib}/net/CNetworkAddress.cpp
|
||||||
${root_lib}/net/CSocketMultiplexer.cpp
|
${root_lib}/net/CSocketMultiplexer.cpp
|
||||||
${root_lib}/net/CTCPListenSocket.cpp
|
${root_lib}/net/CTCPListenSocket.cpp
|
||||||
|
@ -176,7 +176,7 @@ SET(src_lib_net
|
||||||
${root_lib}/net/XSocket.cpp
|
${root_lib}/net/XSocket.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_net
|
set(inc_lib_net
|
||||||
${root_lib}/net/CNetworkAddress.h
|
${root_lib}/net/CNetworkAddress.h
|
||||||
${root_lib}/net/CSocketMultiplexer.h
|
${root_lib}/net/CSocketMultiplexer.h
|
||||||
${root_lib}/net/CTCPListenSocket.h
|
${root_lib}/net/CTCPListenSocket.h
|
||||||
|
@ -191,7 +191,7 @@ SET(inc_lib_net
|
||||||
${root_lib}/net/XSocket.h
|
${root_lib}/net/XSocket.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_xwindows
|
set(src_lib_platform_xwindows
|
||||||
${root_lib}/platform/CXWindowsClipboard.cpp
|
${root_lib}/platform/CXWindowsClipboard.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp
|
${root_lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp
|
||||||
${root_lib}/platform/CXWindowsClipboardBMPConverter.cpp
|
${root_lib}/platform/CXWindowsClipboardBMPConverter.cpp
|
||||||
|
@ -206,7 +206,7 @@ SET(src_lib_platform_xwindows
|
||||||
${root_lib}/platform/CXWindowsUtil.cpp
|
${root_lib}/platform/CXWindowsUtil.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_mswindows
|
set(src_lib_platform_mswindows
|
||||||
${root_lib}/platform/CMSWindowsClipboard.cpp
|
${root_lib}/platform/CMSWindowsClipboard.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp
|
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp
|
||||||
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.cpp
|
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.cpp
|
||||||
|
@ -222,7 +222,7 @@ SET(src_lib_platform_mswindows
|
||||||
${root_lib}/platform/CMSWindowsRelauncher.cpp
|
${root_lib}/platform/CMSWindowsRelauncher.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_platform_mswindows
|
set(inc_lib_platform_mswindows
|
||||||
${root_lib}/platform/CMSWindowsClipboard.h
|
${root_lib}/platform/CMSWindowsClipboard.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.h
|
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.h
|
||||||
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.h
|
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.h
|
||||||
|
@ -238,15 +238,15 @@ SET(inc_lib_platform_mswindows
|
||||||
${root_lib}/platform/CMSWindowsRelauncher.h
|
${root_lib}/platform/CMSWindowsRelauncher.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_hook
|
set(src_lib_platform_hook
|
||||||
${root_lib}/platform/CSynergyHook.cpp
|
${root_lib}/platform/CSynergyHook.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_platform_hook
|
set(inc_lib_platform_hook
|
||||||
${root_lib}/platform/CSynergyHook.h
|
${root_lib}/platform/CSynergyHook.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_platform_carbon
|
set(src_lib_platform_carbon
|
||||||
${root_lib}/platform/COSXClipboard.cpp
|
${root_lib}/platform/COSXClipboard.cpp
|
||||||
${root_lib}/platform/COSXClipboardAnyTextConverter.cpp
|
${root_lib}/platform/COSXClipboardAnyTextConverter.cpp
|
||||||
${root_lib}/platform/COSXClipboardTextConverter.cpp
|
${root_lib}/platform/COSXClipboardTextConverter.cpp
|
||||||
|
@ -258,7 +258,7 @@ SET(src_lib_platform_carbon
|
||||||
${root_lib}/platform/COSXScreenSaverUtil.m
|
${root_lib}/platform/COSXScreenSaverUtil.m
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_server
|
set(src_lib_server
|
||||||
${root_lib}/server/CBaseClientProxy.cpp
|
${root_lib}/server/CBaseClientProxy.cpp
|
||||||
${root_lib}/server/CClientListener.cpp
|
${root_lib}/server/CClientListener.cpp
|
||||||
${root_lib}/server/CClientProxy.cpp
|
${root_lib}/server/CClientProxy.cpp
|
||||||
|
@ -273,7 +273,7 @@ SET(src_lib_server
|
||||||
${root_lib}/server/CServer.cpp
|
${root_lib}/server/CServer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_server
|
set(inc_lib_server
|
||||||
${root_lib}/server/CBaseClientProxy.h
|
${root_lib}/server/CBaseClientProxy.h
|
||||||
${root_lib}/server/CClientListener.h
|
${root_lib}/server/CClientListener.h
|
||||||
${root_lib}/server/CClientProxy.h
|
${root_lib}/server/CClientProxy.h
|
||||||
|
@ -288,7 +288,7 @@ SET(inc_lib_server
|
||||||
${root_lib}/server/CServer.h
|
${root_lib}/server/CServer.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_lib_synergy
|
set(src_lib_synergy
|
||||||
${root_lib}/synergy/CClientTaskBarReceiver.cpp
|
${root_lib}/synergy/CClientTaskBarReceiver.cpp
|
||||||
${root_lib}/synergy/CServerTaskBarReceiver.cpp
|
${root_lib}/synergy/CServerTaskBarReceiver.cpp
|
||||||
${root_lib}/synergy/CApp.cpp
|
${root_lib}/synergy/CApp.cpp
|
||||||
|
@ -311,7 +311,7 @@ SET(src_lib_synergy
|
||||||
${root_lib}/synergy/XSynergy.cpp
|
${root_lib}/synergy/XSynergy.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_lib_synergy
|
set(inc_lib_synergy
|
||||||
${root_lib}/synergy/CClientTaskBarReceiver.h
|
${root_lib}/synergy/CClientTaskBarReceiver.h
|
||||||
${root_lib}/synergy/CServerTaskBarReceiver.h
|
${root_lib}/synergy/CServerTaskBarReceiver.h
|
||||||
${root_lib}/synergy/CApp.h
|
${root_lib}/synergy/CApp.h
|
||||||
|
@ -342,7 +342,7 @@ SET(inc_lib_synergy
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create default `src`, with cross-platform sources.
|
# Create default `src`, with cross-platform sources.
|
||||||
SET(src_lib
|
set(src_lib
|
||||||
${src_lib_arch}
|
${src_lib_arch}
|
||||||
${src_lib_base}
|
${src_lib_base}
|
||||||
${src_lib_client}
|
${src_lib_client}
|
||||||
|
@ -355,27 +355,27 @@ SET(src_lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# Append to `src_lib`, the platform specific sources.
|
# Append to `src_lib`, the platform specific sources.
|
||||||
IF(UNIX)
|
if (UNIX)
|
||||||
LIST(APPEND src_lib ${src_lib_arch_unix})
|
list(APPEND src_lib ${src_lib_arch_unix})
|
||||||
|
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
LIST(APPEND src_lib
|
list(APPEND src_lib
|
||||||
${src_lib_platform_carbon}
|
${src_lib_platform_carbon}
|
||||||
${inc_lib_synergy_carbon}
|
${inc_lib_synergy_carbon}
|
||||||
${src_lib_synergy_carbon}
|
${src_lib_synergy_carbon}
|
||||||
)
|
)
|
||||||
ELSE(APPLE)
|
else (APPLE)
|
||||||
LIST(APPEND src_lib
|
list(APPEND src_lib
|
||||||
${src_lib_platform_xwindows}
|
${src_lib_platform_xwindows}
|
||||||
${inc_lib_synergy_xwindows}
|
${inc_lib_synergy_xwindows}
|
||||||
${src_lib_synergy_xwindows}
|
${src_lib_synergy_xwindows}
|
||||||
)
|
)
|
||||||
ENDIF(APPLE)
|
endif()
|
||||||
|
|
||||||
ENDIF(UNIX)
|
endif()
|
||||||
|
|
||||||
IF(WIN32)
|
if (WIN32)
|
||||||
LIST(APPEND src_lib
|
list(APPEND src_lib
|
||||||
${inc_lib_base}
|
${inc_lib_base}
|
||||||
${inc_lib_client}
|
${inc_lib_client}
|
||||||
${inc_lib_common}
|
${inc_lib_common}
|
||||||
|
@ -391,9 +391,9 @@ IF(WIN32)
|
||||||
${inc_lib_synergy_mswindows}
|
${inc_lib_synergy_mswindows}
|
||||||
${src_lib_synergy_mswindows}
|
${src_lib_synergy_mswindows}
|
||||||
)
|
)
|
||||||
ENDIF(WIN32)
|
endif()
|
||||||
|
|
||||||
SET(inc_lib_dirs
|
set(inc_lib_dirs
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
${root_dir}/lib/base
|
${root_dir}/lib/base
|
||||||
|
@ -409,9 +409,9 @@ SET(inc_lib_dirs
|
||||||
${root_dir}/third_party/gtest/include
|
${root_dir}/third_party/gtest/include
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_lib_dirs})
|
include_directories(${inc_lib_dirs})
|
||||||
ADD_LIBRARY(synergy STATIC ${src_lib})
|
add_library(synergy STATIC ${src_lib})
|
||||||
|
|
||||||
IF(WIN32)
|
if (WIN32)
|
||||||
ADD_LIBRARY(synrgyhk SHARED ${inc_lib_platform_hook} ${src_lib_platform_hook})
|
add_library(synrgyhk SHARED ${inc_lib_platform_hook} ${src_lib_platform_hook})
|
||||||
ENDIF(WIN32)
|
endif()
|
||||||
|
|
|
@ -13,26 +13,26 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(root_cmd_synergyc ${root_dir}/cmd/synergyc)
|
set(root_cmd_synergyc ${root_dir}/cmd/synergyc)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_common
|
set(src_cmd_synergyc_common
|
||||||
${root_cmd_synergyc}/synergyc.cpp
|
${root_cmd_synergyc}/synergyc.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_xwindows
|
set(src_cmd_synergyc_xwindows
|
||||||
${root_cmd_synergyc}/CXWindowsClientTaskBarReceiver.cpp
|
${root_cmd_synergyc}/CXWindowsClientTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_mswindows
|
set(src_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.cpp
|
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_cmd_synergyc_mswindows
|
set(inc_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.h
|
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.h
|
||||||
${root_cmd_synergyc}/resource.h
|
${root_cmd_synergyc}/resource.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(res_cmd_synergyc_mswindows
|
set(res_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/synergyc.ico
|
${root_cmd_synergyc}/synergyc.ico
|
||||||
${root_cmd_synergyc}/synergyc.rc
|
${root_cmd_synergyc}/synergyc.rc
|
||||||
${root_cmd_synergyc}/tb_error.ico
|
${root_cmd_synergyc}/tb_error.ico
|
||||||
|
@ -41,31 +41,31 @@ SET(res_cmd_synergyc_mswindows
|
||||||
${root_cmd_synergyc}/tb_wait.ico
|
${root_cmd_synergyc}/tb_wait.ico
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc_carbon
|
set(src_cmd_synergyc_carbon
|
||||||
${root_cmd_synergyc}/COSXClientTaskBarReceiver.cpp
|
${root_cmd_synergyc}/COSXClientTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergyc ${src_cmd_synergyc_common})
|
set(src_cmd_synergyc ${src_cmd_synergyc_common})
|
||||||
|
|
||||||
IF(UNIX)
|
if (UNIX)
|
||||||
|
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_carbon})
|
list(APPEND src_cmd_synergyc ${src_cmd_synergyc_carbon})
|
||||||
ELSE(APPLE)
|
else (APPLE)
|
||||||
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_xwindows})
|
list(APPEND src_cmd_synergyc ${src_cmd_synergyc_xwindows})
|
||||||
ENDIF(APPLE)
|
endif()
|
||||||
|
|
||||||
ELSE(UNIX)
|
else (UNIX)
|
||||||
|
|
||||||
LIST(APPEND src_cmd_synergyc
|
list(APPEND src_cmd_synergyc
|
||||||
${inc_cmd_synergyc_mswindows}
|
${inc_cmd_synergyc_mswindows}
|
||||||
${res_cmd_synergyc_mswindows}
|
${res_cmd_synergyc_mswindows}
|
||||||
${src_cmd_synergyc_mswindows}
|
${src_cmd_synergyc_mswindows}
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(UNIX)
|
endif()
|
||||||
|
|
||||||
SET(inc_dirs_cmd_synergyc
|
set(inc_dirs_cmd_synergyc
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib
|
${root_dir}/lib
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
|
@ -79,6 +79,6 @@ SET(inc_dirs_cmd_synergyc
|
||||||
${root_dir}/lib/synergy
|
${root_dir}/lib/synergy
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergyc})
|
include_directories(${inc_dirs_cmd_synergyc})
|
||||||
ADD_EXECUTABLE(synergyc ${src_cmd_synergyc})
|
add_executable(synergyc ${src_cmd_synergyc})
|
||||||
TARGET_LINK_LIBRARIES(synergyc synergy ${libs})
|
target_link_libraries(synergyc synergy ${libs})
|
||||||
|
|
|
@ -13,26 +13,26 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SET(root_cmd_synergys ${root_dir}/cmd/synergys)
|
set(root_cmd_synergys ${root_dir}/cmd/synergys)
|
||||||
|
|
||||||
SET(src_cmd_synergys_common
|
set(src_cmd_synergys_common
|
||||||
${root_cmd_synergys}/synergys.cpp
|
${root_cmd_synergys}/synergys.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys_xwindows
|
set(src_cmd_synergys_xwindows
|
||||||
${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.cpp
|
${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys_mswindows
|
set(src_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.cpp
|
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(inc_cmd_synergys_mswindows
|
set(inc_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.h
|
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.h
|
||||||
${root_cmd_synergys}/resource.h
|
${root_cmd_synergys}/resource.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(res_cmd_synergys_mswindows
|
set(res_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/synergys.ico
|
${root_cmd_synergys}/synergys.ico
|
||||||
${root_cmd_synergys}/synergys.rc
|
${root_cmd_synergys}/synergys.rc
|
||||||
${root_cmd_synergys}/tb_error.ico
|
${root_cmd_synergys}/tb_error.ico
|
||||||
|
@ -41,31 +41,31 @@ SET(res_cmd_synergys_mswindows
|
||||||
${root_cmd_synergys}/tb_wait.ico
|
${root_cmd_synergys}/tb_wait.ico
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys_carbon
|
set(src_cmd_synergys_carbon
|
||||||
${root_cmd_synergys}/COSXServerTaskBarReceiver.cpp
|
${root_cmd_synergys}/COSXServerTaskBarReceiver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(src_cmd_synergys ${src_cmd_synergys_common})
|
set(src_cmd_synergys ${src_cmd_synergys_common})
|
||||||
|
|
||||||
IF(UNIX)
|
if (UNIX)
|
||||||
|
|
||||||
IF(APPLE)
|
if (APPLE)
|
||||||
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_carbon})
|
list(APPEND src_cmd_synergys ${src_cmd_synergys_carbon})
|
||||||
ELSE(APPLE)
|
else (APPLE)
|
||||||
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_xwindows})
|
list(APPEND src_cmd_synergys ${src_cmd_synergys_xwindows})
|
||||||
ENDIF(APPLE)
|
endif()
|
||||||
|
|
||||||
ELSE(UNIX)
|
else (UNIX)
|
||||||
|
|
||||||
LIST(APPEND src_cmd_synergys
|
list(APPEND src_cmd_synergys
|
||||||
${inc_cmd_synergys_mswindows}
|
${inc_cmd_synergys_mswindows}
|
||||||
${res_cmd_synergys_mswindows}
|
${res_cmd_synergys_mswindows}
|
||||||
${src_cmd_synergys_mswindows}
|
${src_cmd_synergys_mswindows}
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(UNIX)
|
endif()
|
||||||
|
|
||||||
SET(inc_dirs_cmd_synergys
|
set(inc_dirs_cmd_synergys
|
||||||
${root_dir}
|
${root_dir}
|
||||||
${root_dir}/lib
|
${root_dir}/lib
|
||||||
${root_dir}/lib/arch
|
${root_dir}/lib/arch
|
||||||
|
@ -79,6 +79,6 @@ SET(inc_dirs_cmd_synergys
|
||||||
${root_dir}/lib/server
|
${root_dir}/lib/server
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergys})
|
include_directories(${inc_dirs_cmd_synergys})
|
||||||
ADD_EXECUTABLE(synergys ${src_cmd_synergys})
|
add_executable(synergys ${src_cmd_synergys})
|
||||||
TARGET_LINK_LIBRARIES(synergys synergy ${libs})
|
target_link_libraries(synergys synergy ${libs})
|
||||||
|
|
Loading…
Reference in New Issue