mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 11:02:21 +03:00
Imported cmake and hm from mercurial.
This commit is contained in:
parent
09eb530adb
commit
6a86d3a1e4
41
CMakeLists.txt
Normal file
41
CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
||||
# Version number for Synergy+
|
||||
SET(VERSION_MAJOR 1)
|
||||
SET(VERSION_MINOR 3)
|
||||
SET(VERSION_REV 5)
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
|
||||
|
||||
# The check for 2.6 may be too strict (consider lowering).
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)
|
||||
|
||||
# CMake complains if we don't have this.
|
||||
IF(COMMAND cmake_policy)
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
# We're escaping quotes in the Windows version number, because
|
||||
# for some reason CMake won't do it at config version 2.4.7
|
||||
# It seems that this restores the newer behaviour where define
|
||||
# args are not auto-escaped.
|
||||
IF(COMMAND cmake_policy)
|
||||
CMAKE_POLICY(SET CMP0005 NEW)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
# First, declare project (important for prerequisite checks).
|
||||
PROJECT(synergy-plus C CXX)
|
||||
|
||||
# Set some easy to type variables.
|
||||
SET(root_dir ${CMAKE_SOURCE_DIR})
|
||||
SET(cmake_dir ${root_dir}/cmake)
|
||||
SET(bin_dir ${root_dir}/bin)
|
||||
|
||||
# Now for the stuff to generate config.h (and setup defines).
|
||||
INCLUDE(${cmake_dir}/CMakeLists_config.txt)
|
||||
|
||||
# Now for all the executables and libraries.
|
||||
INCLUDE(${cmake_dir}/CMakeLists_lib.txt)
|
||||
INCLUDE(${cmake_dir}/CMakeLists_synergyc.txt)
|
||||
INCLUDE(${cmake_dir}/CMakeLists_synergys.txt)
|
||||
INCLUDE(${cmake_dir}/CMakeLists_launcher.txt)
|
||||
|
||||
# Setup the CPack config.
|
||||
INCLUDE(${cmake_dir}/CMakeLists_cpack.txt)
|
1
COMPILE
Normal file
1
COMPILE
Normal file
@ -0,0 +1 @@
|
||||
See: http://code.google.com/p/synergy-plus/wiki/Compiling
|
193
cmake/CMakeLists_config.txt
Normal file
193
cmake/CMakeLists_config.txt
Normal file
@ -0,0 +1,193 @@
|
||||
# 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
|
||||
# lib, it is automatically passed to the linker.
|
||||
SET(libs)
|
||||
|
||||
# Depending on the platform, pass in the required defines.
|
||||
IF(UNIX)
|
||||
|
||||
# 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(HAVE_INET_ATON_ADV)
|
||||
|
||||
ENDIF(NOT HAVE_INET_ATON)
|
||||
|
||||
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(HAVE_PTHREAD)
|
||||
MESSAGE(FATAL_ERROR "Missing library: pthread")
|
||||
ENDIF(HAVE_PTHREAD)
|
||||
|
||||
IF(APPLE)
|
||||
|
||||
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}
|
||||
)
|
||||
|
||||
ELSE(APPLE)
|
||||
|
||||
SET(XKBlib "X11/XKBlib.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("${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/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H)
|
||||
CHECK_INCLUDE_FILES(${XKBlib} HAVE_X11_XKBLIB_H)
|
||||
|
||||
IF(HAVE_X11_EXTENSIONS_DPMS_H)
|
||||
# Assume that function prototypes declared, when include exists.
|
||||
SET(HAVE_DPMS_PROTOTYPES 1)
|
||||
ENDIF(HAVE_X11_EXTENSIONS_DPMS_H)
|
||||
|
||||
IF(NOT HAVE_X11_XKBLIB_H)
|
||||
MESSAGE(FATAL_ERROR "Missing header: " ${XKBlib})
|
||||
ENDIF(NOT HAVE_X11_XKBLIB_H)
|
||||
|
||||
CHECK_LIBRARY_EXISTS("SM;ICE" IceConnectionNumber "" HAVE_ICE)
|
||||
CHECK_LIBRARY_EXISTS("X11;Xext" DPMSQueryExtension "" HAVE_Xext)
|
||||
CHECK_LIBRARY_EXISTS("X11;Xext;Xtst" XTestQueryExtension "" HAVE_Xtst)
|
||||
CHECK_LIBRARY_EXISTS("Xinerama" XineramaQueryExtension "" HAVE_Xinerama)
|
||||
|
||||
IF(HAVE_ICE)
|
||||
|
||||
# Assume we have SM if we have ICE.
|
||||
SET(HAVE_SM 1)
|
||||
LIST(APPEND libs SM ICE)
|
||||
|
||||
ENDIF(HAVE_ICE)
|
||||
|
||||
IF(HAVE_Xtst)
|
||||
|
||||
# Xtxt depends on X11.
|
||||
SET(HAVE_X11)
|
||||
LIST(APPEND libs X11 Xtst)
|
||||
|
||||
ELSE(HAVE_Xtst)
|
||||
|
||||
MESSAGE(FATAL_ERROR "Missing library: Xtst")
|
||||
|
||||
ENDIF(HAVE_Xtst)
|
||||
|
||||
IF(HAVE_Xext)
|
||||
LIST(APPEND libs Xext)
|
||||
ENDIF(HAVE_Xext)
|
||||
|
||||
IF(HAVE_Xinerama)
|
||||
LIST(APPEND libs Xinerama)
|
||||
ELSE(HAVE_Xinerama)
|
||||
IF(HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||
MESSAGE(FATAL_ERROR "Missing library: Xinerama")
|
||||
ENDIF(HAVE_X11_EXTENSIONS_XINERAMA_H)
|
||||
ENDIF(HAVE_Xinerama)
|
||||
|
||||
ENDIF(APPLE)
|
||||
|
||||
# For config.h, set some static values; it may be a good idea to make
|
||||
# these values dynamic for non-standard UNIX compilers.
|
||||
SET(ACCEPT_TYPE_ARG3 socklen_t)
|
||||
SET(HAVE_CXX_BOOL 1)
|
||||
SET(HAVE_CXX_CASTS 1)
|
||||
SET(HAVE_CXX_EXCEPTIONS 1)
|
||||
SET(HAVE_CXX_MUTABLE 1)
|
||||
SET(HAVE_CXX_STDLIB 1)
|
||||
SET(HAVE_PTHREAD_SIGNAL 1)
|
||||
SET(SELECT_TYPE_ARG1 int)
|
||||
SET(SELECT_TYPE_ARG234 "(fd_set *)")
|
||||
SET(SELECT_TYPE_ARG5 "(struct timeval *)")
|
||||
SET(STDC_HEADERS 1)
|
||||
SET(TIME_WITH_SYS_TIME 1)
|
||||
SET(HAVE_SOCKLEN_T 1)
|
||||
|
||||
# For config.h, save the results based on a template (config.h.in).
|
||||
CONFIGURE_FILE(${cmake_dir}/config.h.in ${root_dir}/config.h)
|
||||
|
||||
ADD_DEFINITIONS(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
|
||||
|
||||
IF(APPLE)
|
||||
ADD_DEFINITIONS(-DWINAPI_CARBON=1 -D_THREAD_SAFE)
|
||||
ELSE(APPLE)
|
||||
ADD_DEFINITIONS(-DWINAPI_XWINDOWS=1)
|
||||
ENDIF(APPLE)
|
||||
|
||||
ELSE(UNIX)
|
||||
|
||||
ADD_DEFINITIONS(
|
||||
/DWIN32
|
||||
/D_WINDOWS
|
||||
/D_CRT_SECURE_NO_WARNINGS
|
||||
/DVERSION=\"${VERSION}\"
|
||||
)
|
||||
|
||||
ENDIF(UNIX)
|
79
cmake/CMakeLists_cpack.txt
Normal file
79
cmake/CMakeLists_cpack.txt
Normal file
@ -0,0 +1,79 @@
|
||||
#
|
||||
# Synergy+ CPack config
|
||||
#
|
||||
# List of CPack variables:
|
||||
# http://www.vtk.org/Wiki/CMake:CPackConfiguration
|
||||
#
|
||||
|
||||
# CPack files common to all platforms.
|
||||
SET(cpack_targets synergys synergyc)
|
||||
|
||||
IF(WIN32)
|
||||
# Windows has an extra GUI and DLL.
|
||||
LIST(APPEND cpack_targets launcher synrgyhk)
|
||||
ENDIF(WIN32)
|
||||
|
||||
INSTALL(
|
||||
TARGETS ${cpack_targets}
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
# The default CPack behaviour is not to append the system processor
|
||||
# type, which is undesirable in our case, since we want to support
|
||||
# both 32-bit and 64-bit processors.
|
||||
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
# Hack: When running CMake on 64-bit Windows 7, the value of
|
||||
# CMAKE_SYSTEM_PROCESSOR always seems to be x86, regardless of if the
|
||||
# CMake build is 32-bit or 64-bit. As a work around, we will prefix either
|
||||
# x86 or x64 (in the same style as Microsoft do with their installers).
|
||||
# However, some confusion may be caused when the user sees that Synergy+
|
||||
# is installed in the x86 Program Files directory (even though it's a
|
||||
# 64-bit build). This is caused by NSIS only supporting the 32-bit
|
||||
# installs structure (also uses 32-bit registry key locations).
|
||||
IF(WIN32)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(CPACK_SYSTEM_NAME Windows-x64)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(CPACK_SYSTEM_NAME Windows-x86)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# For source code, use .tar.gz on Unix, and .zip on Windows
|
||||
IF(UNIX)
|
||||
SET(CPACK_SOURCE_GENERATOR TGZ)
|
||||
ELSE(UNIX)
|
||||
SET(CPACK_SOURCE_GENERATOR ZIP)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(CPACK_PACKAGE_NAME "synergy-plus")
|
||||
SET(CPACK_PACKAGE_VENDOR "The Synergy+ Project")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installs Synergy+ server and client")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV})
|
||||
SET(CPACK_PACKAGE_VERSION ${VERSION})
|
||||
SET(CPACK_PACKAGE_CONTACT http://code.google.com/p/synergy-plus/)
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf")
|
||||
SET(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt")
|
||||
|
||||
IF(WIN32)
|
||||
SET(WIN32_ICON "${root_dir}/cmd/launcher/synergy.ico")
|
||||
SET(CPACK_NSIS_MUI_ICON ${WIN32_ICON})
|
||||
SET(CPACK_NSIS_MUI_UNIICON ${WIN32_ICON})
|
||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME launcher)
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Synergy+")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES launcher;Synergy+)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# For source package, leave out temp and Mercurial stuff.
|
||||
SET(CPACK_SOURCE_IGNORE_FILES
|
||||
"/build/" # Temp CMake build dir.
|
||||
"/bin/" # Temp binary output dir.
|
||||
"/.hg/" # Mercurial repo cache.
|
||||
"/.hgignore" # Mercurial ignore list (not neede by end-user).
|
||||
".*~" # Emacs temporary files.
|
||||
"/config.h" # The config.h file should be generated.
|
||||
)
|
||||
|
||||
# Must be last (since it relies of CPACK_ vars).
|
||||
INCLUDE(CPack)
|
69
cmake/CMakeLists_launcher.txt
Normal file
69
cmake/CMakeLists_launcher.txt
Normal file
@ -0,0 +1,69 @@
|
||||
IF(WIN32)
|
||||
SET(root_cmd_launcher ${root_dir}/cmd/launcher)
|
||||
|
||||
SET(src_cmd_launcher_mswindows
|
||||
${root_cmd_launcher}/CAddScreen.cpp
|
||||
${root_cmd_launcher}/CAdvancedOptions.cpp
|
||||
${root_cmd_launcher}/CAutoStart.cpp
|
||||
${root_cmd_launcher}/CGlobalOptions.cpp
|
||||
${root_cmd_launcher}/CHotkeyOptions.cpp
|
||||
${root_cmd_launcher}/CInfo.cpp
|
||||
${root_cmd_launcher}/CScreensLinks.cpp
|
||||
${root_cmd_launcher}/LaunchUtil.cpp
|
||||
${root_cmd_launcher}/launcher.cpp
|
||||
)
|
||||
|
||||
SET(inc_cmd_launcher_mswindows
|
||||
${root_cmd_launcher}/CAddScreen.h
|
||||
${root_cmd_launcher}/CAdvancedOptions.h
|
||||
${root_cmd_launcher}/CAutoStart.h
|
||||
${root_cmd_launcher}/CGlobalOptions.h
|
||||
${root_cmd_launcher}/CHotkeyOptions.h
|
||||
${root_cmd_launcher}/CInfo.h
|
||||
${root_cmd_launcher}/CScreensLinks.h
|
||||
${root_cmd_launcher}/LaunchUtil.h
|
||||
${root_cmd_launcher}/resource.h
|
||||
)
|
||||
|
||||
SET(res_cmd_launcher_mswindows
|
||||
${root_cmd_launcher}/launcher.rc
|
||||
${root_cmd_launcher}/synergy.ico
|
||||
)
|
||||
|
||||
SET(src_cmd_launcher)
|
||||
|
||||
IF(UNIX)
|
||||
IF(APPLE)
|
||||
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_carbon})
|
||||
ELSE(APPLE)
|
||||
LIST(APPEND src_cmd_launcher ${src_cmd_launcher_xwindows})
|
||||
ENDIF(APPLE)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(WIN32)
|
||||
LIST(APPEND src_cmd_launcher
|
||||
${inc_cmd_launcher_mswindows}
|
||||
${res_cmd_launcher_mswindows}
|
||||
${src_cmd_launcher_mswindows}
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(inc_dirs_cmd_launcher
|
||||
${root_dir}
|
||||
${root_dir}/lib
|
||||
${root_dir}/lib/arch
|
||||
${root_dir}/lib/base
|
||||
${root_dir}/lib/common
|
||||
${root_dir}/lib/io
|
||||
${root_dir}/lib/mt
|
||||
${root_dir}/lib/net
|
||||
${root_dir}/lib/platform
|
||||
${root_dir}/lib/synergy
|
||||
${root_dir}/lib/server
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_launcher})
|
||||
ADD_EXECUTABLE(launcher WIN32 ${src_cmd_launcher})
|
||||
TARGET_LINK_LIBRARIES(launcher synergy ${libs})
|
||||
|
||||
ENDIF(WIN32)
|
370
cmake/CMakeLists_lib.txt
Normal file
370
cmake/CMakeLists_lib.txt
Normal file
@ -0,0 +1,370 @@
|
||||
SET(root_lib ${root_dir}/lib)
|
||||
|
||||
SET(src_lib_arch
|
||||
${root_lib}/arch/CArch.cpp
|
||||
${root_lib}/arch/CArchDaemonNone.cpp
|
||||
${root_lib}/arch/XArch.cpp
|
||||
)
|
||||
|
||||
SET(src_lib_arch_unix
|
||||
${root_lib}/arch/CArchConsoleUnix.cpp
|
||||
${root_lib}/arch/CArchDaemonUnix.cpp
|
||||
${root_lib}/arch/CArchFileUnix.cpp
|
||||
${root_lib}/arch/CArchLogUnix.cpp
|
||||
${root_lib}/arch/CArchMultithreadPosix.cpp
|
||||
${root_lib}/arch/CArchNetworkBSD.cpp
|
||||
${root_lib}/arch/CArchSleepUnix.cpp
|
||||
${root_lib}/arch/CArchStringUnix.cpp
|
||||
${root_lib}/arch/CArchSystemUnix.cpp
|
||||
${root_lib}/arch/CArchTaskBarXWindows.cpp
|
||||
${root_lib}/arch/CArchTimeUnix.cpp
|
||||
${root_lib}/arch/XArchUnix.cpp
|
||||
)
|
||||
|
||||
SET(src_lib_arch_windows
|
||||
${root_lib}/arch/CArchConsoleWindows.cpp
|
||||
${root_lib}/arch/CArchDaemonWindows.cpp
|
||||
${root_lib}/arch/CArchFileWindows.cpp
|
||||
${root_lib}/arch/CArchLogWindows.cpp
|
||||
${root_lib}/arch/CArchMiscWindows.cpp
|
||||
${root_lib}/arch/CArchMultithreadWindows.cpp
|
||||
${root_lib}/arch/CArchNetworkWinsock.cpp
|
||||
${root_lib}/arch/CArchSleepWindows.cpp
|
||||
${root_lib}/arch/CArchStringWindows.cpp
|
||||
${root_lib}/arch/CArchSystemWindows.cpp
|
||||
${root_lib}/arch/CArchTaskBarWindows.cpp
|
||||
${root_lib}/arch/CArchTimeWindows.cpp
|
||||
${root_lib}/arch/XArchWindows.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_arch_windows
|
||||
${root_lib}/arch/CArchConsoleWindows.h
|
||||
${root_lib}/arch/CArchDaemonWindows.h
|
||||
${root_lib}/arch/CArchFileWindows.h
|
||||
${root_lib}/arch/CArchLogWindows.h
|
||||
${root_lib}/arch/CArchMiscWindows.h
|
||||
${root_lib}/arch/CArchMultithreadWindows.h
|
||||
${root_lib}/arch/CArchNetworkWinsock.h
|
||||
${root_lib}/arch/CArchSleepWindows.h
|
||||
${root_lib}/arch/CArchStringWindows.h
|
||||
${root_lib}/arch/CArchSystemWindows.h
|
||||
${root_lib}/arch/CArchTaskBarWindows.h
|
||||
${root_lib}/arch/CArchTimeWindows.h
|
||||
${root_lib}/arch/XArchWindows.h
|
||||
)
|
||||
|
||||
SET(src_lib_base
|
||||
${root_lib}/base/CEvent.cpp
|
||||
${root_lib}/base/CEventQueue.cpp
|
||||
${root_lib}/base/CFunctionEventJob.cpp
|
||||
${root_lib}/base/CFunctionJob.cpp
|
||||
${root_lib}/base/CLog.cpp
|
||||
${root_lib}/base/CSimpleEventQueueBuffer.cpp
|
||||
${root_lib}/base/CStopwatch.cpp
|
||||
${root_lib}/base/CStringUtil.cpp
|
||||
${root_lib}/base/CUnicode.cpp
|
||||
${root_lib}/base/IEventQueue.cpp
|
||||
${root_lib}/base/LogOutputters.cpp
|
||||
${root_lib}/base/XBase.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_base
|
||||
${root_lib}/base/CEvent.h
|
||||
${root_lib}/base/CEventQueue.h
|
||||
${root_lib}/base/CFunctionEventJob.h
|
||||
${root_lib}/base/CFunctionJob.h
|
||||
${root_lib}/base/CLog.h
|
||||
${root_lib}/base/CPriorityQueue.h
|
||||
${root_lib}/base/CSimpleEventQueueBuffer.h
|
||||
${root_lib}/base/CStopwatch.h
|
||||
${root_lib}/base/CString.h
|
||||
${root_lib}/base/CStringUtil.h
|
||||
${root_lib}/base/CUnicode.h
|
||||
${root_lib}/base/IEventJob.h
|
||||
${root_lib}/base/IEventQueue.h
|
||||
${root_lib}/base/IEventQueueBuffer.h
|
||||
${root_lib}/base/IJob.h
|
||||
${root_lib}/base/ILogOutputter.h
|
||||
${root_lib}/base/LogOutputters.h
|
||||
${root_lib}/base/TMethodEventJob.h
|
||||
${root_lib}/base/TMethodJob.h
|
||||
${root_lib}/base/XBase.h
|
||||
)
|
||||
|
||||
SET(src_lib_client
|
||||
${root_lib}/client/CClient.cpp
|
||||
${root_lib}/client/CServerProxy.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_client
|
||||
${root_lib}/client/CClient.h
|
||||
${root_lib}/client/CServerProxy.h
|
||||
)
|
||||
|
||||
SET(src_lib_common
|
||||
${root_lib}/common/Version.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_common
|
||||
${root_lib}/common/Version.h
|
||||
)
|
||||
|
||||
SET(src_lib_io
|
||||
${root_lib}/io/CStreamBuffer.cpp
|
||||
${root_lib}/io/CStreamFilter.cpp
|
||||
${root_lib}/io/IStream.cpp
|
||||
${root_lib}/io/XIO.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_io
|
||||
${root_lib}/io/CStreamBuffer.h
|
||||
${root_lib}/io/CStreamFilter.h
|
||||
${root_lib}/io/IStream.h
|
||||
${root_lib}/io/IStreamFilterFactory.h
|
||||
${root_lib}/io/XIO.h
|
||||
)
|
||||
|
||||
SET(src_lib_mt
|
||||
${root_lib}/mt/CCondVar.cpp
|
||||
${root_lib}/mt/CLock.cpp
|
||||
${root_lib}/mt/CMutex.cpp
|
||||
${root_lib}/mt/CThread.cpp
|
||||
${root_lib}/mt/XMT.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_mt
|
||||
${root_lib}/mt/CCondVar.h
|
||||
${root_lib}/mt/CLock.h
|
||||
${root_lib}/mt/CMutex.h
|
||||
${root_lib}/mt/CThread.h
|
||||
${root_lib}/mt/XMT.h
|
||||
${root_lib}/mt/XThread.h
|
||||
)
|
||||
|
||||
SET(src_lib_net
|
||||
${root_lib}/net/CNetworkAddress.cpp
|
||||
${root_lib}/net/CSocketMultiplexer.cpp
|
||||
${root_lib}/net/CTCPListenSocket.cpp
|
||||
${root_lib}/net/CTCPSocket.cpp
|
||||
${root_lib}/net/CTCPSocketFactory.cpp
|
||||
${root_lib}/net/IDataSocket.cpp
|
||||
${root_lib}/net/IListenSocket.cpp
|
||||
${root_lib}/net/ISocket.cpp
|
||||
${root_lib}/net/XSocket.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_net
|
||||
${root_lib}/net/CNetworkAddress.h
|
||||
${root_lib}/net/CSocketMultiplexer.h
|
||||
${root_lib}/net/CTCPListenSocket.h
|
||||
${root_lib}/net/CTCPSocket.h
|
||||
${root_lib}/net/CTCPSocketFactory.h
|
||||
${root_lib}/net/IDataSocket.h
|
||||
${root_lib}/net/IListenSocket.h
|
||||
${root_lib}/net/ISocket.h
|
||||
${root_lib}/net/ISocketFactory.h
|
||||
${root_lib}/net/ISocketMultiplexerJob.h
|
||||
${root_lib}/net/TSocketMultiplexerMethodJob.h
|
||||
${root_lib}/net/XSocket.h
|
||||
)
|
||||
|
||||
SET(src_lib_platform_xwindows
|
||||
${root_lib}/platform/CXWindowsClipboard.cpp
|
||||
${root_lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp
|
||||
${root_lib}/platform/CXWindowsClipboardBMPConverter.cpp
|
||||
${root_lib}/platform/CXWindowsClipboardHTMLConverter.cpp
|
||||
${root_lib}/platform/CXWindowsClipboardTextConverter.cpp
|
||||
${root_lib}/platform/CXWindowsClipboardUCS2Converter.cpp
|
||||
${root_lib}/platform/CXWindowsClipboardUTF8Converter.cpp
|
||||
${root_lib}/platform/CXWindowsEventQueueBuffer.cpp
|
||||
${root_lib}/platform/CXWindowsKeyState.cpp
|
||||
${root_lib}/platform/CXWindowsScreen.cpp
|
||||
${root_lib}/platform/CXWindowsScreenSaver.cpp
|
||||
${root_lib}/platform/CXWindowsUtil.cpp
|
||||
)
|
||||
|
||||
SET(src_lib_platform_mswindows
|
||||
${root_lib}/platform/CMSWindowsClipboard.cpp
|
||||
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp
|
||||
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.cpp
|
||||
${root_lib}/platform/CMSWindowsClipboardHTMLConverter.cpp
|
||||
${root_lib}/platform/CMSWindowsClipboardTextConverter.cpp
|
||||
${root_lib}/platform/CMSWindowsClipboardUTF16Converter.cpp
|
||||
${root_lib}/platform/CMSWindowsDesks.cpp
|
||||
${root_lib}/platform/CMSWindowsEventQueueBuffer.cpp
|
||||
${root_lib}/platform/CMSWindowsKeyState.cpp
|
||||
${root_lib}/platform/CMSWindowsScreen.cpp
|
||||
${root_lib}/platform/CMSWindowsScreenSaver.cpp
|
||||
${root_lib}/platform/CMSWindowsUtil.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_platform_mswindows
|
||||
${root_lib}/platform/CMSWindowsClipboard.h
|
||||
${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.h
|
||||
${root_lib}/platform/CMSWindowsClipboardBitmapConverter.h
|
||||
${root_lib}/platform/CMSWindowsClipboardHTMLConverter.h
|
||||
${root_lib}/platform/CMSWindowsClipboardTextConverter.h
|
||||
${root_lib}/platform/CMSWindowsClipboardUTF16Converter.h
|
||||
${root_lib}/platform/CMSWindowsDesks.h
|
||||
${root_lib}/platform/CMSWindowsEventQueueBuffer.h
|
||||
${root_lib}/platform/CMSWindowsKeyState.h
|
||||
${root_lib}/platform/CMSWindowsScreen.h
|
||||
${root_lib}/platform/CMSWindowsScreenSaver.h
|
||||
${root_lib}/platform/CMSWindowsUtil.h
|
||||
)
|
||||
|
||||
SET(src_lib_platform_hook
|
||||
${root_lib}/platform/CSynergyHook.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_platform_hook
|
||||
${root_lib}/platform/CSynergyHook.h
|
||||
)
|
||||
|
||||
SET(src_lib_platform_carbon
|
||||
${root_lib}/platform/COSXClipboard.cpp
|
||||
${root_lib}/platform/COSXClipboardAnyTextConverter.cpp
|
||||
${root_lib}/platform/COSXClipboardTextConverter.cpp
|
||||
${root_lib}/platform/COSXClipboardUTF16Converter.cpp
|
||||
${root_lib}/platform/COSXEventQueueBuffer.cpp
|
||||
${root_lib}/platform/COSXKeyState.cpp
|
||||
${root_lib}/platform/COSXScreen.cpp
|
||||
${root_lib}/platform/COSXScreenSaver.cpp
|
||||
${root_lib}/platform/COSXScreenSaverUtil.m
|
||||
)
|
||||
|
||||
SET(src_lib_server
|
||||
${root_lib}/server/CBaseClientProxy.cpp
|
||||
${root_lib}/server/CClientListener.cpp
|
||||
${root_lib}/server/CClientProxy.cpp
|
||||
${root_lib}/server/CClientProxy1_0.cpp
|
||||
${root_lib}/server/CClientProxy1_1.cpp
|
||||
${root_lib}/server/CClientProxy1_2.cpp
|
||||
${root_lib}/server/CClientProxy1_3.cpp
|
||||
${root_lib}/server/CClientProxyUnknown.cpp
|
||||
${root_lib}/server/CConfig.cpp
|
||||
${root_lib}/server/CInputFilter.cpp
|
||||
${root_lib}/server/CPrimaryClient.cpp
|
||||
${root_lib}/server/CServer.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_server
|
||||
${root_lib}/server/CBaseClientProxy.h
|
||||
${root_lib}/server/CClientListener.h
|
||||
${root_lib}/server/CClientProxy.h
|
||||
${root_lib}/server/CClientProxy1_0.h
|
||||
${root_lib}/server/CClientProxy1_1.h
|
||||
${root_lib}/server/CClientProxy1_2.h
|
||||
${root_lib}/server/CClientProxy1_3.h
|
||||
${root_lib}/server/CClientProxyUnknown.h
|
||||
${root_lib}/server/CConfig.h
|
||||
${root_lib}/server/CInputFilter.h
|
||||
${root_lib}/server/CPrimaryClient.h
|
||||
${root_lib}/server/CServer.h
|
||||
)
|
||||
|
||||
SET(src_lib_synergy
|
||||
${root_lib}/synergy/CClipboard.cpp
|
||||
${root_lib}/synergy/CKeyMap.cpp
|
||||
${root_lib}/synergy/CKeyState.cpp
|
||||
${root_lib}/synergy/CPacketStreamFilter.cpp
|
||||
${root_lib}/synergy/CPlatformScreen.cpp
|
||||
${root_lib}/synergy/CProtocolUtil.cpp
|
||||
${root_lib}/synergy/CScreen.cpp
|
||||
${root_lib}/synergy/IClipboard.cpp
|
||||
${root_lib}/synergy/IKeyState.cpp
|
||||
${root_lib}/synergy/IPrimaryScreen.cpp
|
||||
${root_lib}/synergy/IScreen.cpp
|
||||
${root_lib}/synergy/KeyTypes.cpp
|
||||
${root_lib}/synergy/ProtocolTypes.cpp
|
||||
${root_lib}/synergy/XScreen.cpp
|
||||
${root_lib}/synergy/XSynergy.cpp
|
||||
)
|
||||
|
||||
SET(inc_lib_synergy
|
||||
${root_lib}/synergy/CClipboard.h
|
||||
${root_lib}/synergy/CKeyMap.h
|
||||
${root_lib}/synergy/CKeyState.h
|
||||
${root_lib}/synergy/CPacketStreamFilter.h
|
||||
${root_lib}/synergy/CPlatformScreen.h
|
||||
${root_lib}/synergy/CProtocolUtil.h
|
||||
${root_lib}/synergy/CScreen.h
|
||||
${root_lib}/synergy/ClipboardTypes.h
|
||||
${root_lib}/synergy/IClient.h
|
||||
${root_lib}/synergy/IClipboard.h
|
||||
${root_lib}/synergy/IKeyState.h
|
||||
${root_lib}/synergy/IPlatformScreen.h
|
||||
${root_lib}/synergy/IPrimaryScreen.h
|
||||
${root_lib}/synergy/IScreen.h
|
||||
${root_lib}/synergy/IScreenSaver.h
|
||||
${root_lib}/synergy/ISecondaryScreen.h
|
||||
${root_lib}/synergy/KeyTypes.h
|
||||
${root_lib}/synergy/MouseTypes.h
|
||||
${root_lib}/synergy/OptionTypes.h
|
||||
${root_lib}/synergy/ProtocolTypes.h
|
||||
${root_lib}/synergy/XScreen.h
|
||||
${root_lib}/synergy/XSynergy.h
|
||||
)
|
||||
|
||||
# Create default `src`, with cross-platform sources.
|
||||
SET(src_lib
|
||||
${src_lib_arch}
|
||||
${src_lib_base}
|
||||
${src_lib_client}
|
||||
${src_lib_common}
|
||||
${src_lib_io}
|
||||
${src_lib_mt}
|
||||
${src_lib_net}
|
||||
${src_lib_server}
|
||||
${src_lib_synergy}
|
||||
)
|
||||
|
||||
# Append to `src_lib`, the platform specific sources.
|
||||
IF(UNIX)
|
||||
LIST(APPEND src_lib ${src_lib_arch_unix})
|
||||
|
||||
IF(APPLE)
|
||||
LIST(APPEND src_lib ${src_lib_platform_carbon})
|
||||
ELSE(APPLE)
|
||||
LIST(APPEND src_lib ${src_lib_platform_xwindows})
|
||||
ENDIF(APPLE)
|
||||
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(WIN32)
|
||||
LIST(APPEND src_lib
|
||||
${inc_lib_base}
|
||||
${inc_lib_client}
|
||||
${inc_lib_common}
|
||||
${inc_lib_io}
|
||||
${inc_lib_mt}
|
||||
${inc_lib_net}
|
||||
${inc_lib_server}
|
||||
${inc_lib_synergy}
|
||||
${inc_lib_arch_windows}
|
||||
${src_lib_arch_windows}
|
||||
${inc_lib_platform_mswindows}
|
||||
${src_lib_platform_mswindows}
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(inc_lib_dirs
|
||||
{$root_dir}
|
||||
{$root_dir}/lib/arch
|
||||
{$root_dir}/lib/base
|
||||
{$root_dir}/lib/client
|
||||
{$root_dir}/lib/common
|
||||
{$root_dir}/lib/io
|
||||
{$root_dir}/lib/mt
|
||||
{$root_dir}/lib/net
|
||||
{$root_dir}/lib/platform
|
||||
{$root_dir}/lib/server
|
||||
{$root_dir}/lib/synergy
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(${inc_lib_dirs})
|
||||
ADD_LIBRARY(synergy STATIC ${src_lib})
|
||||
|
||||
IF(WIN32)
|
||||
ADD_LIBRARY(synrgyhk SHARED ${inc_lib_platform_hook} ${src_lib_platform_hook})
|
||||
ENDIF(WIN32)
|
70
cmake/CMakeLists_synergyc.txt
Normal file
70
cmake/CMakeLists_synergyc.txt
Normal file
@ -0,0 +1,70 @@
|
||||
SET(root_cmd_synergyc ${root_dir}/cmd/synergyc)
|
||||
|
||||
SET(src_cmd_synergyc_common
|
||||
${root_cmd_synergyc}/CClientTaskBarReceiver.cpp
|
||||
${root_cmd_synergyc}/synergyc.cpp
|
||||
)
|
||||
|
||||
SET(src_cmd_synergyc_xwindows
|
||||
${root_cmd_synergyc}/CXWindowsClientTaskBarReceiver.cpp
|
||||
)
|
||||
|
||||
SET(src_cmd_synergyc_mswindows
|
||||
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.cpp
|
||||
)
|
||||
|
||||
SET(inc_cmd_synergyc_mswindows
|
||||
${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.h
|
||||
${root_cmd_synergyc}/resource.h
|
||||
)
|
||||
|
||||
SET(res_cmd_synergyc_mswindows
|
||||
${root_cmd_synergyc}/synergyc.ico
|
||||
${root_cmd_synergyc}/synergyc.rc
|
||||
${root_cmd_synergyc}/tb_error.ico
|
||||
${root_cmd_synergyc}/tb_idle.ico
|
||||
${root_cmd_synergyc}/tb_run.ico
|
||||
${root_cmd_synergyc}/tb_wait.ico
|
||||
)
|
||||
|
||||
SET(src_cmd_synergyc_carbon
|
||||
${root_cmd_synergyc}/COSXClientTaskBarReceiver.cpp
|
||||
)
|
||||
|
||||
SET(src_cmd_synergyc ${src_cmd_synergyc_common})
|
||||
|
||||
IF(UNIX)
|
||||
|
||||
IF(APPLE)
|
||||
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_carbon})
|
||||
ELSE(APPLE)
|
||||
LIST(APPEND src_cmd_synergyc ${src_cmd_synergyc_xwindows})
|
||||
ENDIF(APPLE)
|
||||
|
||||
ELSE(UNIX)
|
||||
|
||||
LIST(APPEND src_cmd_synergyc
|
||||
${inc_cmd_synergyc_mswindows}
|
||||
${res_cmd_synergyc_mswindows}
|
||||
${src_cmd_synergyc_mswindows}
|
||||
)
|
||||
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(inc_dirs_cmd_synergyc
|
||||
${root_dir}
|
||||
${root_dir}/lib
|
||||
${root_dir}/lib/arch
|
||||
${root_dir}/lib/base
|
||||
${root_dir}/lib/client
|
||||
${root_dir}/lib/common
|
||||
${root_dir}/lib/io
|
||||
${root_dir}/lib/mt
|
||||
${root_dir}/lib/net
|
||||
${root_dir}/lib/platform
|
||||
${root_dir}/lib/synergy
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergyc})
|
||||
ADD_EXECUTABLE(synergyc WIN32 ${src_cmd_synergyc})
|
||||
TARGET_LINK_LIBRARIES(synergyc synergy ${libs})
|
73
cmake/CMakeLists_synergys.txt
Normal file
73
cmake/CMakeLists_synergys.txt
Normal file
@ -0,0 +1,73 @@
|
||||
SET(root_cmd_synergys ${root_dir}/cmd/synergys)
|
||||
|
||||
SET(src_cmd_synergys_common
|
||||
${root_cmd_synergys}/CServerTaskBarReceiver.cpp
|
||||
${root_cmd_synergys}/synergys.cpp
|
||||
)
|
||||
|
||||
SET(src_cmd_synergys_xwindows
|
||||
${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.cpp
|
||||
)
|
||||
|
||||
SET(src_cmd_synergys_mswindows
|
||||
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.cpp
|
||||
)
|
||||
|
||||
SET(inc_cmd_synergys_mswindows
|
||||
${root_cmd_synergys}/CServerTaskBarReceiver.h
|
||||
${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.h
|
||||
${root_cmd_synergys}/resource.h
|
||||
${root_cmd_synergys}/COSXServerTaskBarReceiver.h
|
||||
${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.h
|
||||
)
|
||||
|
||||
SET(res_cmd_synergys_mswindows
|
||||
${root_cmd_synergys}/synergys.ico
|
||||
${root_cmd_synergys}/synergys.rc
|
||||
${root_cmd_synergys}/tb_error.ico
|
||||
${root_cmd_synergys}/tb_idle.ico
|
||||
${root_cmd_synergys}/tb_run.ico
|
||||
${root_cmd_synergys}/tb_wait.ico
|
||||
)
|
||||
|
||||
SET(src_cmd_synergys_carbon
|
||||
${root_cmd_synergys}/COSXServerTaskBarReceiver.cpp
|
||||
)
|
||||
|
||||
SET(src_cmd_synergys ${src_cmd_synergys_common})
|
||||
|
||||
IF(UNIX)
|
||||
|
||||
IF(APPLE)
|
||||
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_carbon})
|
||||
ELSE(APPLE)
|
||||
LIST(APPEND src_cmd_synergys ${src_cmd_synergys_xwindows})
|
||||
ENDIF(APPLE)
|
||||
|
||||
ELSE(UNIX)
|
||||
|
||||
LIST(APPEND src_cmd_synergys
|
||||
${inc_cmd_synergys_mswindows}
|
||||
${res_cmd_synergys_mswindows}
|
||||
${src_cmd_synergys_mswindows}
|
||||
)
|
||||
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(inc_dirs_cmd_synergys
|
||||
${root_dir}
|
||||
${root_dir}/lib
|
||||
${root_dir}/lib/arch
|
||||
${root_dir}/lib/base
|
||||
${root_dir}/lib/common
|
||||
${root_dir}/lib/io
|
||||
${root_dir}/lib/mt
|
||||
${root_dir}/lib/net
|
||||
${root_dir}/lib/platform
|
||||
${root_dir}/lib/synergy
|
||||
${root_dir}/lib/server
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(${inc_dirs_cmd_synergys})
|
||||
ADD_EXECUTABLE(synergys WIN32 ${src_cmd_synergys})
|
||||
TARGET_LINK_LIBRARIES(synergys synergy ${libs})
|
102
cmake/License.rtf
Normal file
102
cmake/License.rtf
Normal file
@ -0,0 +1,102 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\froman\fcharset0 Times-Roman;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\info
|
||||
{\title Original file was gpl-2.0.tex}
|
||||
{\doccomm Created using latex2rtf 1.9.19a on Sun Jul 12 19:21:22 2009}}\paperw12280\paperh15900\margl2680\margr2700\margb1760\margt2540\vieww12280\viewh15900\viewkind1
|
||||
\deftab720
|
||||
\pard\pardeftab720\ri0\qj
|
||||
|
||||
\f0\fs24 \cf0 \
|
||||
\pard\pardeftab720\ri0\qc
|
||||
|
||||
\f1\fs30 \cf0 GNU GENERAL PUBLIC LICENSE
|
||||
\f0\fs24 \
|
||||
\
|
||||
\
|
||||
\pard\pardeftab720\ri0\qc
|
||||
|
||||
\f1 \cf0 Version 2, June 1991\
|
||||
\
|
||||
\
|
||||
Copyright \'a9 1989, 1991 Free Software Foundation, Inc.\
|
||||
\pard\pardeftab720\ri0\sb240\qc
|
||||
\cf0 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\
|
||||
\pard\pardeftab720\ri0\qc
|
||||
\cf0 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. \
|
||||
\pard\pardeftab720\ri0\qc
|
||||
|
||||
\b\fs26 \cf0 Preamble
|
||||
\b0\fs24 \
|
||||
\pard\pardeftab720\ri0\qj
|
||||
\cf0 The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software\'97to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation\'92s software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.\
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.\
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.\
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\
|
||||
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.\
|
||||
Also, for each author\'92s protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors\'92 reputations.\
|
||||
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone\'92s free use or not licensed at all.\
|
||||
The precise terms and conditions for copying, distribution and modification follow.\
|
||||
\pard\pardeftab720\ri0\qc
|
||||
|
||||
\fs31 \cf0 Terms and Conditions For Copying, Distribution and Modification
|
||||
\fs24 \
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 1. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The \'93Program\'94, below, refers to any such program or work, and a \'93work based on the Program\'94 means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term \'93modification\'94.) Each licensee is addressed as \'93you\'94.\
|
||||
\pard\pardeftab720\li600\ri0\qj
|
||||
\cf0 Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 2. You may copy and distribute verbatim copies of the Program\'92s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.\
|
||||
\pard\pardeftab720\li600\ri0\qj
|
||||
\cf0 You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 3. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\
|
||||
\pard\pardeftab720\li1200\fi-300\ri0\sb50\qj
|
||||
\cf0 (a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.\
|
||||
(b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.\
|
||||
(c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)\
|
||||
\pard\pardeftab720\li600\ri0\sb100\qj
|
||||
\cf0 These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\qj
|
||||
\cf0 Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.\
|
||||
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 4. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:\
|
||||
\pard\pardeftab720\li1200\fi-300\ri0\sb50\qj
|
||||
\cf0 (a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\
|
||||
(b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\
|
||||
(c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)\
|
||||
\pard\pardeftab720\li600\ri0\sb100\qj
|
||||
\cf0 The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\qj
|
||||
\cf0 If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 5. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.\
|
||||
6. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.\
|
||||
7. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients\'92 exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.\
|
||||
8. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.\
|
||||
\pard\pardeftab720\li600\ri0\qj
|
||||
\cf0 If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.\
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.\
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 9. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.\
|
||||
10. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\
|
||||
\pard\pardeftab720\li600\ri0\qj
|
||||
\cf0 Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and \'93any later version\'94, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.\
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 11. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.\
|
||||
\pard\pardeftab720\li600\ri0\qc
|
||||
|
||||
\fs31 \cf0 No Warranty
|
||||
\fs24 \
|
||||
\pard\pardeftab720\li600\fi-300\ri0\sb50\qj
|
||||
\cf0 12. Because the program is licensed free of charge, there is no warranty for the program, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the program \'93as is\'94 without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.
|
||||
\f0 \
|
||||
|
||||
\f1 13. In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the program as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages.
|
||||
\f0 \
|
||||
\pard\pardeftab720\ri0\sb100\qc
|
||||
|
||||
\f1\fs31 \cf0 End of Terms and Conditions
|
||||
\fs24 }
|
422
cmake/License.tex
Normal file
422
cmake/License.tex
Normal file
@ -0,0 +1,422 @@
|
||||
\documentclass[11pt]{article}
|
||||
|
||||
\title{GNU GENERAL PUBLIC LICENSE}
|
||||
\date{Version 2, June 1991}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\begin{center}
|
||||
{\parindent 0in
|
||||
|
||||
Copyright \copyright\ 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
\bigskip
|
||||
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
\bigskip
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
}
|
||||
\end{center}
|
||||
|
||||
\begin{center}
|
||||
{\bf\large Preamble}
|
||||
\end{center}
|
||||
|
||||
|
||||
The licenses for most software are designed to take away your freedom to
|
||||
share and change it. By contrast, the GNU General Public License is
|
||||
intended to guarantee your freedom to share and change free software---to
|
||||
make sure the software is free for all its users. This General Public
|
||||
License applies to most of the Free Software Foundation's software and to
|
||||
any other program whose authors commit to using it. (Some other Free
|
||||
Software Foundation software is covered by the GNU Library General Public
|
||||
License instead.) You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price.
|
||||
Our General Public Licenses are designed to make sure that you have the
|
||||
freedom to distribute copies of free software (and charge for this service
|
||||
if you wish), that you receive source code or can get it if you want it,
|
||||
that you can change the software or use pieces of it in new free programs;
|
||||
and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to
|
||||
deny you these rights or to ask you to surrender the rights. These
|
||||
restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or
|
||||
for a fee, you must give the recipients all the rights that you have. You
|
||||
must make sure that they, too, receive or can get the source code. And
|
||||
you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If
|
||||
the software is modified by someone else and passed on, we want its
|
||||
recipients to know that what they have is not the original, so that any
|
||||
problems introduced by others will not reflect on the original authors'
|
||||
reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents.
|
||||
We wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program
|
||||
proprietary. To prevent this, we have made it clear that any patent must
|
||||
be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
\begin{center}
|
||||
{\Large \sc Terms and Conditions For Copying, Distribution and
|
||||
Modification}
|
||||
\end{center}
|
||||
|
||||
|
||||
%\renewcommand{\theenumi}{\alpha{enumi}}
|
||||
\begin{enumerate}
|
||||
|
||||
\addtocounter{enumi}{-1}
|
||||
|
||||
\item
|
||||
|
||||
This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the
|
||||
terms of this General Public License. The ``Program'', below, refers to
|
||||
any such program or work, and a ``work based on the Program'' means either
|
||||
the Program or any derivative work under copyright law: that is to say, a
|
||||
work containing the Program or a portion of it, either verbatim or with
|
||||
modifications and/or translated into another language. (Hereinafter,
|
||||
translation is included without limitation in the term ``modification''.)
|
||||
Each licensee is addressed as ``you''.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
\item You may copy and distribute verbatim copies of the Program's source
|
||||
code as you receive it, in any medium, provided that you conspicuously
|
||||
and appropriately publish on each copy an appropriate copyright notice
|
||||
and disclaimer of warranty; keep intact all the notices that refer to
|
||||
this License and to the absence of any warranty; and give any other
|
||||
recipients of the Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you
|
||||
may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
\item
|
||||
|
||||
You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
\begin{enumerate}
|
||||
|
||||
\item
|
||||
|
||||
You must cause the modified files to carry prominent notices stating that
|
||||
you changed the files and the date of any change.
|
||||
|
||||
\item
|
||||
|
||||
You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
\item
|
||||
If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
\item
|
||||
You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
\begin{enumerate}
|
||||
|
||||
\item
|
||||
|
||||
Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
\item
|
||||
|
||||
Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
\item
|
||||
|
||||
Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
\item
|
||||
You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
\item
|
||||
You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
\item
|
||||
Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
\item
|
||||
If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
\item
|
||||
If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
\item
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and ``any
|
||||
later version'', you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
\item
|
||||
If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
\begin{center}
|
||||
{\Large\sc
|
||||
No Warranty
|
||||
}
|
||||
\end{center}
|
||||
|
||||
\item
|
||||
{\sc Because the program is licensed free of charge, there is no warranty
|
||||
for the program, to the extent permitted by applicable law. Except when
|
||||
otherwise stated in writing the copyright holders and/or other parties
|
||||
provide the program ``as is'' without warranty of any kind, either expressed
|
||||
or implied, including, but not limited to, the implied warranties of
|
||||
merchantability and fitness for a particular purpose. The entire risk as
|
||||
to the quality and performance of the program is with you. Should the
|
||||
program prove defective, you assume the cost of all necessary servicing,
|
||||
repair or correction.}
|
||||
|
||||
\item
|
||||
{\sc In no event unless required by applicable law or agreed to in writing
|
||||
will any copyright holder, or any other party who may modify and/or
|
||||
redistribute the program as permitted above, be liable to you for damages,
|
||||
including any general, special, incidental or consequential damages arising
|
||||
out of the use or inability to use the program (including but not limited
|
||||
to loss of data or data being rendered inaccurate or losses sustained by
|
||||
you or third parties or a failure of the program to operate with any other
|
||||
programs), even if such holder or other party has been advised of the
|
||||
possibility of such damages.}
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\begin{center}
|
||||
{\Large\sc End of Terms and Conditions}
|
||||
\end{center}
|
||||
|
||||
|
||||
\pagebreak[2]
|
||||
|
||||
\section*{Appendix: How to Apply These Terms to Your New Programs}
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively convey
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
``copyright'' line and a pointer to where the full notice is found.
|
||||
|
||||
\begin{quote}
|
||||
one line to give the program's name and a brief idea of what it does. \\
|
||||
Copyright (C) yyyy name of author \\
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
\end{quote}
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
\begin{quote}
|
||||
Gnomovision version 69, Copyright (C) yyyy name of author \\
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. \\
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
\end{quote}
|
||||
|
||||
|
||||
The hypothetical commands {\tt show w} and {\tt show c} should show the
|
||||
appropriate parts of the General Public License. Of course, the commands
|
||||
you use may be called something other than {\tt show w} and {\tt show c};
|
||||
they could even be mouse-clicks or menu items---whatever suits your
|
||||
program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a ``copyright disclaimer'' for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
\begin{quote}
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program \\
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker. \\
|
||||
|
||||
signature of Ty Coon, 1 April 1989 \\
|
||||
Ty Coon, President of Vice
|
||||
\end{quote}
|
||||
|
||||
|
||||
This General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications
|
||||
with the library. If this is what you want to do, use the GNU Library
|
||||
General Public License instead of this License.
|
||||
|
||||
\end{document}
|
12
cmake/Readme.txt
Normal file
12
cmake/Readme.txt
Normal file
@ -0,0 +1,12 @@
|
||||
Thank you for chosing Synergy+!
|
||||
http://code.google.com/p/synergy-plus/
|
||||
|
||||
Synergy+ allows you to share your keyboard and mouse between computers over a network.
|
||||
|
||||
For FAQ, setup, and usage instructions, please visit our online Readme:
|
||||
http://code.google.com/p/synergy-plus/wiki/Readme
|
||||
|
||||
Have fun!
|
||||
|
||||
Thanks,
|
||||
The Synergy+ Team
|
167
cmake/config.h.in
Normal file
167
cmake/config.h.in
Normal file
@ -0,0 +1,167 @@
|
||||
/* Define version here for Unix, but using /D for Windows. */
|
||||
#cmakedefine VERSION "${VERSION}"
|
||||
|
||||
/* Define to the base type of arg 3 for `accept`. */
|
||||
#cmakedefine ACCEPT_TYPE_ARG3 ${ACCEPT_TYPE_ARG3}
|
||||
|
||||
/* Define if your compiler has bool support. */
|
||||
#cmakedefine HAVE_CXX_BOOL ${HAVE_CXX_BOOL}
|
||||
|
||||
/* Define if your compiler has C++ cast support. */
|
||||
#cmakedefine HAVE_CXX_CASTS ${HAVE_CXX_CASTS}
|
||||
|
||||
/* Define if your compiler has exceptions support. */
|
||||
#cmakedefine HAVE_CXX_EXCEPTIONS ${HAVE_CXX_EXCEPTIONS}
|
||||
|
||||
/* Define if your compiler has mutable support. */
|
||||
#cmakedefine HAVE_CXX_MUTABLE ${HAVE_CXX_MUTABLE}
|
||||
|
||||
/* Define if your compiler has standard C++ library support. */
|
||||
#cmakedefine HAVE_CXX_STDLIB ${HAVE_CXX_STDLIB}
|
||||
|
||||
/* Define if the <X11/extensions/dpms.h> header file declares function prototypes. */
|
||||
#cmakedefine HAVE_DPMS_PROTOTYPES ${HAVE_DPMS_PROTOTYPES}
|
||||
|
||||
/* Define if you have a working `getpwuid_r` function. */
|
||||
#cmakedefine HAVE_GETPWUID_R ${HAVE_GETPWUID_R}
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r` function. */
|
||||
#cmakedefine HAVE_GMTIME_R ${HAVE_GMTIME_R}
|
||||
|
||||
/* Define if you have the `inet_aton` function. */
|
||||
#cmakedefine HAVE_INET_ATON ${HAVE_INET_ATON}
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H}
|
||||
|
||||
/* Define to 1 if you have the <istream> header file. */
|
||||
#cmakedefine HAVE_ISTREAM ${HAVE_ISTREAM}
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#cmakedefine HAVE_LOCALE_H ${HAVE_LOCALE_H}
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H}
|
||||
|
||||
/* Define if you have the `nanosleep` function. */
|
||||
#cmakedefine HAVE_NANOSLEEP ${HAVE_NANOSLEEP}
|
||||
|
||||
/* Define to 1 if you have the <ostream> header file. */
|
||||
#cmakedefine HAVE_OSTREAM ${HAVE_OSTREAM}
|
||||
|
||||
/* Define if you have the `poll` function. */
|
||||
#cmakedefine HAVE_POLL ${HAVE_POLL}
|
||||
|
||||
/* Define if you have a POSIX `sigwait` function. */
|
||||
#cmakedefine HAVE_POSIX_SIGWAIT ${HAVE_POSIX_SIGWAIT}
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
#cmakedefine HAVE_PTHREAD ${HAVE_PTHREAD}
|
||||
|
||||
/* Define if you have `pthread_sigmask` and `pthread_kill` functions. */
|
||||
#cmakedefine HAVE_PTHREAD_SIGNAL ${HAVE_PTHREAD_SIGNAL}
|
||||
|
||||
/* Define if your compiler defines socklen_t. */
|
||||
#cmakedefine HAVE_SOCKLEN_T ${HAVE_SOCKLEN_T}
|
||||
|
||||
/* Define to 1 if you have the <sstream> header file. */
|
||||
#cmakedefine HAVE_SSTREAM ${HAVE_SSTREAM}
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H}
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H}
|
||||
|
||||
/* Define to 1 if you have the `strftime` function. */
|
||||
#cmakedefine HAVE_STRFTIME ${HAVE_STRFTIME}
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SELECT_H ${HAVE_SYS_SELECT_H}
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H}
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H}
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H}
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H}
|
||||
|
||||
/* Define to 1 if you have the <sys/utsname.h> header file. */
|
||||
#cmakedefine HAVE_SYS_UTSNAME_H ${HAVE_SYS_UTSNAME_H}
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf` function. */
|
||||
#cmakedefine HAVE_VSNPRINTF ${HAVE_VSNPRINTF}
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#cmakedefine HAVE_WCHAR_H ${HAVE_WCHAR_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_DPMS_H ${HAVE_X11_EXTENSIONS_DPMS_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XINERAMA_H ${HAVE_X11_EXTENSIONS_XINERAMA_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XKBstr.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XKBSTR_H ${HAVE_X11_EXTENSIONS_XKBSTR_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XTest.h> header file. */
|
||||
#cmakedefine HAVE_X11_EXTENSIONS_XTEST_H ${HAVE_X11_EXTENSIONS_XTEST_H}
|
||||
|
||||
/* Define to 1 if you have the <X11/XKBlib.h> header file. */
|
||||
#cmakedefine HAVE_X11_XKBLIB_H ${HAVE_X11_XKBLIB_H}
|
||||
|
||||
/* Define this if the XKB extension is available. */
|
||||
#cmakedefine HAVE_XKB_EXTENSION ${HAVE_XKB_EXTENSION}
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on your system. */
|
||||
#cmakedefine PTHREAD_CREATE_JOINABLE ${PTHREAD_CREATE_JOINABLE}
|
||||
|
||||
/* Define to the type of arg 1 for `select`. */
|
||||
#cmakedefine SELECT_TYPE_ARG1 ${SELECT_TYPE_ARG1}
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select`. */
|
||||
#cmakedefine SELECT_TYPE_ARG234 ${SELECT_TYPE_ARG234}
|
||||
|
||||
/* Define to the type of arg 5 for `select`. */
|
||||
#cmakedefine SELECT_TYPE_ARG5 ${SELECT_TYPE_ARG5}
|
||||
|
||||
/* The size of `char`, as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR}
|
||||
|
||||
/* The size of `int`, as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_INT ${SIZEOF_INT}
|
||||
|
||||
/* The size of `long`, as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
|
||||
|
||||
/* The size of `short`, as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT}
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#cmakedefine STDC_HEADERS ${STDC_HEADERS}
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#cmakedefine TIME_WITH_SYS_TIME ${TIME_WITH_SYS_TIME}
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm`. */
|
||||
#cmakedefine TM_IN_SYS_TIME ${TM_IN_SYS_TIME}
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#cmakedefine X_DISPLAY_MISSING ${X_DISPLAY_MISSING}
|
||||
|
||||
/* Define to `unsigned int` if <sys/types.h> does not define. */
|
||||
#cmakedefine size_t ${size_t}
|
670
hm.py
Normal file
670
hm.py
Normal file
@ -0,0 +1,670 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
# hm.py: 'Help Me', is a simple wrapper for `cmake` and `hg`.
|
||||
#
|
||||
# This script was created for the Synergy+ project.
|
||||
# http://code.google.com/p/synergy-plus
|
||||
#
|
||||
# The idea behind this is to simplify the usage of CMake,
|
||||
# while still making cmake independant of this script. In
|
||||
# other words, you don't need to use this script.
|
||||
#
|
||||
# If you don't wish to run this script, simply run:
|
||||
# cmake .
|
||||
# make
|
||||
# This will create an in-source UNIX Makefile.
|
||||
|
||||
import sys, os, ConfigParser, subprocess, shutil
|
||||
|
||||
if sys.platform == 'win32':
|
||||
import _winreg
|
||||
|
||||
project = 'synergy-plus'
|
||||
setup_version = 3
|
||||
website_url = 'http://code.google.com/p/synergy-plus'
|
||||
|
||||
this_cmd = 'hm'
|
||||
cmake_cmd = 'cmake'
|
||||
make_cmd = 'make'
|
||||
xcodebuild_cmd = 'xcodebuild'
|
||||
|
||||
source_dir = '..' # Source, relative to build.
|
||||
cmake_dir = 'cmake'
|
||||
bin_dir = 'bin'
|
||||
build_dir = 'build' # Obsolete
|
||||
|
||||
# Valid commands.
|
||||
commands = [
|
||||
'about',
|
||||
'setup',
|
||||
'configure',
|
||||
'build',
|
||||
'clean',
|
||||
'update',
|
||||
'install',
|
||||
'package',
|
||||
'dist',
|
||||
'open',
|
||||
'destroy',
|
||||
'usage',
|
||||
'revision',
|
||||
'help',
|
||||
'--help',
|
||||
'-h',
|
||||
'/?'
|
||||
]
|
||||
|
||||
win32_generators = {
|
||||
'1' : 'Visual Studio 9 2008',
|
||||
'2' : 'Visual Studio 9 2008 Win64',
|
||||
'3' : 'Visual Studio 8 2005',
|
||||
'4' : 'Visual Studio 8 2005 Win64',
|
||||
'5' : 'Visual Studio 7',
|
||||
'6' : 'Visual Studio 7 .NET 2003',
|
||||
'7' : 'Visual Studio 6',
|
||||
'8' : 'CodeBlocks - MinGW Makefiles',
|
||||
'9' : 'CodeBlocks - Unix Makefiles',
|
||||
'10': 'Eclipse CDT4 - MinGW Makefiles',
|
||||
'11': 'Eclipse CDT4 - NMake Makefiles',
|
||||
'12': 'Eclipse CDT4 - Unix Makefiles',
|
||||
'13': 'MinGW Makefiles',
|
||||
'14': 'NMake Makefiles',
|
||||
'15': 'Unix Makefiles',
|
||||
'16': 'Borland Makefiles',
|
||||
'17': 'MSYS Makefiles',
|
||||
'18': 'Watcom WMake',
|
||||
}
|
||||
|
||||
unix_generators = {
|
||||
'1' : 'Unix Makefiles',
|
||||
'2' : 'CodeBlocks - Unix Makefiles',
|
||||
'3' : 'Eclipse CDT4 - Unix Makefiles',
|
||||
'4' : 'KDevelop3',
|
||||
'5' : 'KDevelop3 - Unix Makefiles',
|
||||
}
|
||||
|
||||
darwin_generators = {
|
||||
'1' : 'Xcode',
|
||||
'2' : 'Unix Makefiles',
|
||||
'3' : 'CodeBlocks - Unix Makefiles',
|
||||
'4' : 'Eclipse CDT4 - Unix Makefiles',
|
||||
'5' : 'KDevelop3',
|
||||
'6' : 'KDevelop3 - Unix Makefiles',
|
||||
}
|
||||
|
||||
sln_filename = '%s.sln' % project
|
||||
xcodeproj_filename = '%s.xcodeproj' % project
|
||||
config_filename = '%s.cfg' % this_cmd
|
||||
|
||||
config_filepath = '%s/%s' % (bin_dir, config_filename)
|
||||
sln_filepath = '%s\%s' % (bin_dir, sln_filename)
|
||||
xcodeproj_filepath= '%s/%s' % (bin_dir, xcodeproj_filename)
|
||||
|
||||
# try_chdir(...) and restore_chdir() will use this
|
||||
prevdir = ''
|
||||
|
||||
def usage():
|
||||
cmd = sys.argv[0]
|
||||
print ('Usage: %s [command]\n'
|
||||
'\n'
|
||||
'Replace [command] with one of:\n'
|
||||
' about Show information about this script\n'
|
||||
' setup Runs the initial setup for this script\n'
|
||||
' configure Runs cmake (generates project files)\n'
|
||||
' open Attempts to open the generated project file\n'
|
||||
' build Builds using the platform build chain\n'
|
||||
' clean Cleans using the platform build chain\n'
|
||||
' destroy Destroy all temporary files (bin and build)\n'
|
||||
' update Updates the source code from repository\n'
|
||||
' revision Display the current source code revision\n'
|
||||
' package Create a distribution package (e.g. tar.gz)\n'
|
||||
' install Installs the program\n'
|
||||
' usage Shows the help screen\n'
|
||||
'\n'
|
||||
'Alias commands:\n'
|
||||
' conf configure\n'
|
||||
' up update\n'
|
||||
' dist package\n'
|
||||
' rev revision\n'
|
||||
'\n'
|
||||
'Example: %s configure'
|
||||
) % (this_cmd, this_cmd)
|
||||
|
||||
def configure():
|
||||
|
||||
err = configure_internal()
|
||||
|
||||
if err == 0:
|
||||
print ('Configure complete!\n\n'
|
||||
'Open project now: %s open\n'
|
||||
'Command line build: %s build'
|
||||
) % (this_cmd, this_cmd)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def configure_internal():
|
||||
|
||||
ensure_setup_latest()
|
||||
|
||||
generator = get_generator()
|
||||
if generator != '':
|
||||
cmake_args = '%s -G "%s"' % (source_dir, generator)
|
||||
else:
|
||||
cmake_args = source_dir
|
||||
|
||||
cmake_cmd_string = '%s %s' % (cmake_cmd, cmake_args)
|
||||
|
||||
print "Configuring with CMake (%s)..." % cmake_cmd_string
|
||||
|
||||
# Run from build dir so we have an out-of-source build.
|
||||
try_chdir(bin_dir)
|
||||
err = os.system(cmake_cmd_string)
|
||||
restore_chdir()
|
||||
|
||||
if err != 0:
|
||||
print 'CMake encountered error:', err
|
||||
else:
|
||||
set_conf_run()
|
||||
|
||||
return err;
|
||||
|
||||
def build(mode):
|
||||
|
||||
ensure_setup_latest()
|
||||
|
||||
if not has_conf_run():
|
||||
if configure_internal() != 0:
|
||||
return False
|
||||
|
||||
generator = get_generator()
|
||||
|
||||
if generator == "Unix Makefiles":
|
||||
|
||||
print 'Building with GNU Make...'
|
||||
try_chdir(bin_dir)
|
||||
err = os.system(make_cmd)
|
||||
restore_chdir()
|
||||
|
||||
if err == 0:
|
||||
return True
|
||||
else:
|
||||
print 'GNU Make failed:', err
|
||||
return False
|
||||
|
||||
elif generator.startswith('Visual Studio 8') or generator.startswith('Visual Studio 9'):
|
||||
|
||||
ret = run_vcbuild(generator, mode)
|
||||
|
||||
if ret == 0:
|
||||
return True
|
||||
else:
|
||||
print 'VCBuild failed:', ret
|
||||
return False
|
||||
|
||||
elif generator == 'Xcode':
|
||||
|
||||
print 'Building with Xcode...'
|
||||
try_chdir(bin_dir)
|
||||
err = os.system(xcodebuild_cmd)
|
||||
restore_chdir()
|
||||
|
||||
if err == 0:
|
||||
return True
|
||||
else:
|
||||
print 'Xcode failed:', err
|
||||
return False
|
||||
|
||||
else:
|
||||
print 'Not supported with generator:',generator
|
||||
return False
|
||||
|
||||
def clean(mode):
|
||||
|
||||
generator = get_generator()
|
||||
|
||||
if generator == "Unix Makefiles":
|
||||
|
||||
print 'Cleaning with GNU Make...'
|
||||
try_chdir(bin_dir)
|
||||
err = os.system(make_cmd + ' clean')
|
||||
restore_chdir()
|
||||
|
||||
if err == 0:
|
||||
return True
|
||||
else:
|
||||
print 'GNU Make failed: %s' % err
|
||||
return False
|
||||
|
||||
elif generator.startswith('Visual Studio 8') or generator.startswith('Visual Studio 9'):
|
||||
|
||||
ret = run_vcbuild(generator, mode, '/clean')
|
||||
|
||||
if ret == 0:
|
||||
return True
|
||||
else:
|
||||
print 'VCBuild failed:', ret
|
||||
return False
|
||||
|
||||
elif generator == 'Xcode':
|
||||
|
||||
print 'Cleaning with Xcode...'
|
||||
try_chdir(bin_dir)
|
||||
err = os.system(xcodebuild_cmd + ' clean')
|
||||
restore_chdir()
|
||||
|
||||
if err == 0:
|
||||
return True
|
||||
else:
|
||||
print 'XCode failed:', err
|
||||
return False
|
||||
|
||||
else:
|
||||
print 'clean: Not supported on platform:',sys.platform
|
||||
return False
|
||||
|
||||
def open_project():
|
||||
generator = get_generator()
|
||||
if generator.startswith('Visual Studio'):
|
||||
open_project_internal(sln_filepath)
|
||||
return True
|
||||
elif generator.startswith('Xcode'):
|
||||
open_project_internal(xcodeproj_filepath, 'open')
|
||||
return True
|
||||
else:
|
||||
print 'Not supported with generator:',generator
|
||||
return False
|
||||
|
||||
def update():
|
||||
print "Running Mercurial pull and update..."
|
||||
os.system('hg pull')
|
||||
os.system('hg update')
|
||||
|
||||
def revision():
|
||||
os.system('hg identify')
|
||||
|
||||
def destroy():
|
||||
msg = "Are you sure you want to remove the ./bin/ directory? [y/N]"
|
||||
print msg,
|
||||
|
||||
yn = raw_input()
|
||||
if yn in ['y', 'Y']:
|
||||
try:
|
||||
shutil.rmtree(bin_dir)
|
||||
except:
|
||||
print "Warning: Could not remove ./bin/ directory."
|
||||
|
||||
def package(type):
|
||||
|
||||
# Package is supported by default.
|
||||
package_unsupported = False
|
||||
|
||||
if type == '':
|
||||
package_usage()
|
||||
elif type == 'src-tgz':
|
||||
if sys.platform in ['linux2', 'darwin']:
|
||||
package_src()
|
||||
else:
|
||||
package_unsupported = True
|
||||
elif type == 'src-zip':
|
||||
if sys.platform == 'win32':
|
||||
package_src()
|
||||
else:
|
||||
package_unsupported = True
|
||||
elif type == 'rpm':
|
||||
if sys.platform == 'linux2':
|
||||
package_rpm()
|
||||
else:
|
||||
package_unsupported = True
|
||||
elif type == 'deb':
|
||||
if sys.platform == 'linux2':
|
||||
package_deb()
|
||||
else:
|
||||
package_unsupported = True
|
||||
elif type == 'win':
|
||||
if sys.platform == 'win32':
|
||||
package_win()
|
||||
else:
|
||||
package_unsupported = True
|
||||
elif type == 'mac':
|
||||
if sys.platform == 'darwin':
|
||||
package_mac()
|
||||
else:
|
||||
package_unsupported = True
|
||||
else:
|
||||
print 'Not yet implemented: package %s' % package_type
|
||||
|
||||
if package_unsupported:
|
||||
print ('Package type, %s is not '
|
||||
'supported for platform, %s') % (type, sys.platform)
|
||||
|
||||
def package_src():
|
||||
# Enter the temp build dir, to preserve source tree.
|
||||
try_chdir(bin_dir)
|
||||
os.system('make package_source')
|
||||
restore_chdir()
|
||||
|
||||
def package_rpm():
|
||||
try_chdir(bin_dir)
|
||||
os.system('cpack -G RPM')
|
||||
restore_chdir()
|
||||
|
||||
def package_deb():
|
||||
try_chdir(bin_dir)
|
||||
os.system('cpack -G DEB')
|
||||
restore_chdir()
|
||||
|
||||
def package_win():
|
||||
try_chdir(bin_dir)
|
||||
os.system('cpack -G NSIS')
|
||||
restore_chdir()
|
||||
|
||||
def package_mac():
|
||||
try_chdir(bin_dir)
|
||||
os.system('cpack -G PackageMaker')
|
||||
restore_chdir()
|
||||
|
||||
def package_usage():
|
||||
print ('Usage: %s package [package-type]\n'
|
||||
'\n'
|
||||
'Replace [package-type] with one of:\n'
|
||||
' src-tgz Create a .tar.gz source distribution\n'
|
||||
' src-zip Create a .zip source distribution\n'
|
||||
' rpm Create a .rpm package (Red Hat)\n'
|
||||
' deb Create a .deb paclage (Debian)\n'
|
||||
' win Create a .exe installer (Windows)\n'
|
||||
' mac Create a .dmg package (Mac OS X)\n'
|
||||
'\n'
|
||||
'Example: %s package src-tgz') % (this_cmd, this_cmd)
|
||||
|
||||
def about():
|
||||
print ('Help Me script, from the Synergy+ project.\n'
|
||||
'%s\n'
|
||||
'\n'
|
||||
'For help, run: %s help') % (website_url, this_cmd)
|
||||
|
||||
#
|
||||
# Important!
|
||||
#
|
||||
# From here on, it's just internal stuff, no need to
|
||||
# change anything here unless adding new commands, or
|
||||
# editing the way the script works.
|
||||
#
|
||||
|
||||
def main(argv):
|
||||
|
||||
if sys.version_info < (2, 4):
|
||||
print "Python version must be at least: 2.4"
|
||||
sys.exit(1)
|
||||
|
||||
if os.path.exists(build_dir):
|
||||
# Make sure the user knows the build dir is obsolete.
|
||||
os.rename(build_dir, build_dir + '-obsolete')
|
||||
|
||||
completions = []
|
||||
arg_1 = ''
|
||||
if len(argv) > 1:
|
||||
arg_1 = argv[1]
|
||||
completions = complete_command(arg_1)
|
||||
|
||||
arg_2 = ''
|
||||
if len(argv) > 2:
|
||||
arg_2 = argv[2]
|
||||
|
||||
if len(completions) > 0:
|
||||
|
||||
if len(completions) == 1:
|
||||
|
||||
cmd = completions[0]
|
||||
|
||||
if cmd != arg_1:
|
||||
print 'From `%s`, assuming command `%s`.' % (arg_1, cmd)
|
||||
|
||||
if cmd in ['about', 'info']:
|
||||
about()
|
||||
elif cmd in ['configure', 'conf']:
|
||||
configure()
|
||||
elif cmd in ['build']:
|
||||
build(arg_2)
|
||||
elif cmd in ['open']:
|
||||
open_project()
|
||||
elif cmd in ['clean']:
|
||||
clean(arg_2)
|
||||
elif cmd in ['update', 'up']:
|
||||
update()
|
||||
elif cmd in ['rev', 'revision']:
|
||||
revision()
|
||||
elif cmd in ['package', 'dist']:
|
||||
package(arg_2)
|
||||
elif cmd in ['usage', 'help', '--help', '-h', '/?']:
|
||||
usage()
|
||||
elif cmd in ['destroy']:
|
||||
destroy()
|
||||
elif cmd in ['setup']:
|
||||
setup()
|
||||
else:
|
||||
print 'Command not yet implemented:',cmd
|
||||
|
||||
else:
|
||||
print ('Command `%s` too ambiguous, '
|
||||
'could mean any of: %s'
|
||||
) % (arg_1, ', '.join(completions))
|
||||
else:
|
||||
|
||||
if len(argv) == 1:
|
||||
print 'No command specified, showing usage.\n'
|
||||
else:
|
||||
print 'Command not recognised: %s\n' % arg_1
|
||||
|
||||
usage()
|
||||
|
||||
def try_chdir(dir):
|
||||
|
||||
# Ensure temp build dir exists.
|
||||
if not os.path.exists(dir):
|
||||
os.mkdir(dir)
|
||||
|
||||
global prevdir
|
||||
prevdir = os.path.abspath(os.curdir)
|
||||
|
||||
# It will exist by this point, so it's safe to chdir.
|
||||
os.chdir(dir)
|
||||
|
||||
def restore_chdir():
|
||||
global prevdir
|
||||
os.chdir(prevdir)
|
||||
|
||||
def open_project_internal(project_filename, application = ''):
|
||||
|
||||
if not os.path.exists(project_filename):
|
||||
print 'Project file (%s) not found, run hm conf first.' % project_filename
|
||||
return False
|
||||
else:
|
||||
path = project_filename
|
||||
if application != '':
|
||||
path = application + ' ' + path
|
||||
os.system(path)
|
||||
return True
|
||||
|
||||
def setup():
|
||||
print "Running setup..."
|
||||
|
||||
if sys.platform == 'win32':
|
||||
generator = setup_generator_get(win32_generators)
|
||||
elif sys.platform in ['linux2', 'sunos5', 'freebsd7']:
|
||||
generator = setup_generator_get(unix_generators)
|
||||
elif sys.platform == 'darwin':
|
||||
generator = setup_generator_get(darwin_generators)
|
||||
else:
|
||||
raise Exception('Unsupported platform: ' + sys.platform)
|
||||
|
||||
# Create build dir, since config file resides there.
|
||||
if not os.path.exists(bin_dir):
|
||||
os.mkdir(bin_dir)
|
||||
|
||||
if os.path.exists(config_filepath):
|
||||
config = ConfigParser.ConfigParser()
|
||||
config.read(config_filepath)
|
||||
else:
|
||||
config = ConfigParser.ConfigParser()
|
||||
|
||||
if not config.has_section('hm'):
|
||||
config.add_section('hm')
|
||||
|
||||
if not config.has_section('cmake'):
|
||||
config.add_section('cmake')
|
||||
|
||||
config.set('hm', 'setup_version', setup_version)
|
||||
config.set('cmake', 'generator', generator)
|
||||
|
||||
write_config(config)
|
||||
|
||||
cmakecache_filename = '%s/CMakeCache.txt' % bin_dir
|
||||
if os.path.exists(cmakecache_filename):
|
||||
print "Removing %s, since generator changed." % cmakecache_filename
|
||||
os.remove(cmakecache_filename)
|
||||
|
||||
print "\nSetup complete."
|
||||
|
||||
def write_config(config):
|
||||
configfile = open(config_filepath, 'wb')
|
||||
config.write(configfile)
|
||||
|
||||
def get_generator():
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config.read(config_filepath)
|
||||
return config.get('cmake', 'generator')
|
||||
|
||||
def has_setup_version(version):
|
||||
if os.path.exists(config_filepath):
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config.read(config_filepath)
|
||||
|
||||
try:
|
||||
return config.getint('hm', 'setup_version') >= version
|
||||
except:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
def has_conf_run():
|
||||
if has_setup_version(2):
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config.read(config_filepath)
|
||||
try:
|
||||
return config.getboolean('hm', 'has_conf_run')
|
||||
except:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_conf_run():
|
||||
if has_setup_version(3):
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config.read(config_filepath)
|
||||
config.set('hm', 'has_conf_run', True)
|
||||
write_config(config)
|
||||
else:
|
||||
raise Exception("User does not have correct setup version.")
|
||||
|
||||
def setup_generator_get(generators):
|
||||
|
||||
generator_options = ''
|
||||
generators_sorted = sorted(generators.iteritems(), key=lambda t: int(t[0]))
|
||||
|
||||
for id, generator in generators_sorted:
|
||||
generator_options += '\n ' + id + ': ' + generator
|
||||
|
||||
print ('\nChoose a CMake generator:%s'
|
||||
) % generator_options
|
||||
|
||||
return setup_generator_prompt(generators)
|
||||
|
||||
def setup_generator_prompt(generators):
|
||||
|
||||
prompt = 'Enter a number:'
|
||||
print prompt,
|
||||
|
||||
generator_id = raw_input()
|
||||
|
||||
if generator_id in generators:
|
||||
print 'Selected generator:', generators[generator_id]
|
||||
else:
|
||||
print 'Invalid number, try again.'
|
||||
setup_generator_prompt(generators)
|
||||
|
||||
return generators[generator_id]
|
||||
|
||||
def complete_command(arg):
|
||||
possible_completions = []
|
||||
for command in commands:
|
||||
if command.startswith(arg):
|
||||
possible_completions.append(command)
|
||||
return possible_completions
|
||||
|
||||
def get_vcvarsall(generator):
|
||||
# This is the *only* valid way of detecting VC8/9 (may work for others also)
|
||||
# Remark: "VC7" key does not change between VC8/9
|
||||
# [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VC7]
|
||||
# "9.0"="C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\"
|
||||
value = None
|
||||
type = None
|
||||
key_name = r'SOFTWARE\Microsoft\VisualStudio\SxS\VC7'
|
||||
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name)
|
||||
if generator.startswith('Visual Studio 8'):
|
||||
value,type = _winreg.QueryValueEx(key, '8.0')
|
||||
elif generator.startswith('Visual Studio 9'):
|
||||
value,type = _winreg.QueryValueEx(key, '9.0')
|
||||
else:
|
||||
raise Exception('Cannot determin vcvarsall.bat location for: ' + generator)
|
||||
path = value + 'vcvarsall.bat'
|
||||
if not os.path.exists(path):
|
||||
raise Exception("'%s' not found.")
|
||||
return path
|
||||
|
||||
def run_vcbuild(generator, mode, args=''):
|
||||
import platform
|
||||
|
||||
# os_bits should be loaded with '32bit' or '64bit'
|
||||
(os_bits, other) = platform.architecture()
|
||||
# Now we choose the parameters bases on OS 32/64 and our target 32/64
|
||||
# http://msdn.microsoft.com/en-us/library/x4d2c09s%28VS.80%29.aspx
|
||||
|
||||
# valid options are only: ia64 amd64 x86_amd64 x86_ia64
|
||||
# but calling vcvarsall.bat does not garantee that it will work
|
||||
# ret code from vcvarsall.bat is always 0 so the only way of knowing that I worked is by analysing the text output
|
||||
# ms bugg: install VS9, FeaturePack, VS9SP1 and you'll obtain a vcvarsall.bat that fails.
|
||||
if generator.find('Win64') != -1:
|
||||
# target = 64bit
|
||||
if os_bits == '32bit':
|
||||
vcvars_platform = 'x86_amd64' # 32bit OS building 64bit app
|
||||
else:
|
||||
vcvars_platform = 'amd64' # 64bit OS building 64bit app
|
||||
config_platform = 'x64'
|
||||
else: # target = 32bit
|
||||
vcvars_platform = 'x86' # 32/64bit OS building 32bit app
|
||||
config_platform = 'Win32'
|
||||
if mode == 'release':
|
||||
config = 'Release|' + config_platform
|
||||
else:
|
||||
config = 'Debug|' + config_platform
|
||||
|
||||
cmd = ('@echo off\n'
|
||||
'call "%s" %s \n'
|
||||
'vcbuild /nologo %s "%s" "%s"'
|
||||
) % (get_vcvarsall(generator), vcvars_platform, args, sln_filepath, config)
|
||||
print cmd
|
||||
# Generate a batch file, since we can't use environment variables directly.
|
||||
temp_bat = bin_dir + r'\vcbuild.bat'
|
||||
file = open(temp_bat, 'w')
|
||||
file.write(cmd)
|
||||
file.close()
|
||||
|
||||
return os.system(temp_bat)
|
||||
|
||||
def ensure_setup_latest():
|
||||
if not has_setup_version(setup_version):
|
||||
setup()
|
||||
|
||||
# Start the program.
|
||||
main(sys.argv)
|
Loading…
Reference in New Issue
Block a user