used glob instead of manually specifying files. cmake does not recommend this, but we always re-run cmake anyway after adding files since we use vs.

This commit is contained in:
Nick Bolton 2014-02-26 17:46:02 +00:00
parent 92961a5cbc
commit f11c660efb
25 changed files with 201 additions and 540 deletions

View File

@ -20,8 +20,8 @@ set(VERSION_MINOR 4)
set(VERSION_REV 17) set(VERSION_REV 17)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}") set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
# The check for 2.6 may be too strict (consider lowering). # 2.8 needed for file glob.
cmake_minimum_required(VERSION 2.4.7) cmake_minimum_required(VERSION 2.8)
# CMake complains if we don't have this. # CMake complains if we don't have this.
if (COMMAND cmake_policy) if (COMMAND cmake_policy)
@ -64,6 +64,14 @@ set(doc_dir ${root_dir}/doc)
# lib, it is automatically passed to the linker. # lib, it is automatically passed to the linker.
set(libs) set(libs)
# only include headers as "source" if not unix makefiles,
# which is useful when using an IDE.
if (${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
set(SYNERGY_ADD_HEADERS FALSE)
else()
set(SYNERGY_ADD_HEADERS TRUE)
endif()
# Depending on the platform, pass in the required defines. # Depending on the platform, pass in the required defines.
if (UNIX) if (UNIX)

View File

@ -16,8 +16,9 @@
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(cmd) add_subdirectory(cmd)
add_subdirectory(plugin)
add_subdirectory(micro)
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "IRIX") if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "IRIX")
add_subdirectory(test) add_subdirectory(test)
endif() endif()
add_subdirectory(plugin)
add_subdirectory(micro)

View File

@ -14,12 +14,12 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src set(sources
synergyc.cpp synergyc.cpp
) )
if (WIN32) if (WIN32)
list(APPEND src list(APPEND sources
CMSWindowsClientTaskBarReceiver.cpp CMSWindowsClientTaskBarReceiver.cpp
CMSWindowsClientTaskBarReceiver.h CMSWindowsClientTaskBarReceiver.h
resource.h resource.h
@ -31,12 +31,12 @@ if (WIN32)
tb_wait.ico tb_wait.ico
) )
elseif (APPLE) elseif (APPLE)
list(APPEND src COSXClientTaskBarReceiver.cpp) list(APPEND sources COSXClientTaskBarReceiver.cpp)
elseif (UNIX) elseif (UNIX)
list(APPEND src CXWindowsClientTaskBarReceiver.cpp) list(APPEND sources CXWindowsClientTaskBarReceiver.cpp)
endif() endif()
set(inc include_directories(
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/client ../../lib/client
@ -52,13 +52,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_executable(synergyc ${sources})
add_executable(synergyc ${src})
target_link_libraries(synergyc target_link_libraries(synergyc
arch base client common io mt net ipc platform server synergy cryptopp ${libs}) arch base client common io mt net ipc platform server synergy cryptopp ${libs})

View File

@ -14,11 +14,10 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src file(GLOB headers "*.h")
synergyd.cpp file(GLOB sources "*.cpp")
)
set(inc include_directories(
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/common ../../lib/common
@ -31,17 +30,15 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc})
if (WIN32) if (WIN32)
add_executable(synergyd WIN32 ${src}) add_executable(synergyd WIN32 ${sources})
else() else()
add_executable(synergyd ${src}) add_executable(synergyd ${sources})
endif() endif()
target_link_libraries(synergyd target_link_libraries(synergyd

View File

@ -14,12 +14,12 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src set(sources
synergyp.cpp synergyp.cpp
) )
if (WIN32) if (WIN32)
list(APPEND src list(APPEND sources
CMSWindowsPortableTaskBarReceiver.cpp CMSWindowsPortableTaskBarReceiver.cpp
CMSWindowsPortableTaskBarReceiver.h CMSWindowsPortableTaskBarReceiver.h
resource.h resource.h
@ -31,12 +31,12 @@ if (WIN32)
tb_wait.ico tb_wait.ico
) )
elseif (APPLE) elseif (APPLE)
list(APPEND src COSXPortableTaskBarReceiver.cpp) list(APPEND sources COSXPortableTaskBarReceiver.cpp)
elseif (UNIX) elseif (UNIX)
list(APPEND src CXWindowsPortableTaskBarReceiver.cpp) list(APPEND sources CXWindowsPortableTaskBarReceiver.cpp)
endif() endif()
set(inc include_directories(
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/common ../../lib/common
@ -52,17 +52,15 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc})
if (WIN32) if (WIN32)
add_executable(synergyp WIN32 ${src}) add_executable(synergyp WIN32 ${sources})
else() else()
add_executable(synergyp ${src}) add_executable(synergyp ${sources})
endif() endif()
target_link_libraries(synergyp target_link_libraries(synergyp

View File

@ -14,12 +14,12 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src set(sources
synergys.cpp synergys.cpp
) )
if (WIN32) if (WIN32)
list(APPEND src list(APPEND sources
CMSWindowsServerTaskBarReceiver.cpp CMSWindowsServerTaskBarReceiver.cpp
CMSWindowsServerTaskBarReceiver.h CMSWindowsServerTaskBarReceiver.h
resource.h resource.h
@ -31,12 +31,12 @@ if (WIN32)
tb_wait.ico tb_wait.ico
) )
elseif (APPLE) elseif (APPLE)
list(APPEND src COSXServerTaskBarReceiver.cpp) list(APPEND sources COSXServerTaskBarReceiver.cpp)
elseif (UNIX) elseif (UNIX)
list(APPEND src CXWindowsServerTaskBarReceiver.cpp) list(APPEND sources CXWindowsServerTaskBarReceiver.cpp)
endif() endif()
set(inc include_directories(
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/common ../../lib/common
@ -52,13 +52,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_executable(synergys ${sources})
add_executable(synergys ${src})
target_link_libraries(synergys target_link_libraries(synergys
arch base client common io mt net ipc platform server synergy cryptopp ${libs}) arch base client common io mt net ipc platform server synergy cryptopp ${libs})

View File

@ -13,11 +13,10 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src file(GLOB headers "*.h")
syntool.cpp file(GLOB sources "*.cpp")
)
set(inc include_directories(
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/common ../../lib/common
@ -32,13 +31,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_executable(syntool ${sources})
add_executable(syntool ${src})
target_link_libraries(syntool target_link_libraries(syntool
synergy arch base client common io ipc mt net platform server cryptopp ${libs}) synergy arch base client common io ipc mt net platform server cryptopp ${libs})

View File

@ -15,11 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
if (WIN32) if (WIN32)
set(src uSynergyWin32.c) set(sources uSynergyWin32.c)
elseif (UNIX) elseif (UNIX)
set(src uSynergyUnix.c) set(sources uSynergyUnix.c)
endif() endif()
include_directories(../../micro) include_directories(../../micro)
add_executable(usynergy ${src}) add_executable(usynergy ${sources})
target_link_libraries(usynergy micro) target_link_libraries(usynergy micro)

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src set(sources
CArch.cpp CArch.cpp
IArchString.cpp IArchString.cpp
XArch.cpp XArch.cpp
@ -23,7 +23,7 @@ set(src
if (WIN32) if (WIN32)
set(inc set(headers
CArch.h CArch.h
CArchConsoleWindows.h CArchConsoleWindows.h
CArchDaemonWindows.h CArchDaemonWindows.h
@ -47,8 +47,8 @@ if (WIN32)
CArchInternetWindows.h CArchInternetWindows.h
) )
list(APPEND src list(APPEND sources
${inc} ${headers}
CArchConsoleWindows.cpp CArchConsoleWindows.cpp
CArchDaemonWindows.cpp CArchDaemonWindows.cpp
CArchFileWindows.cpp CArchFileWindows.cpp
@ -68,7 +68,7 @@ if (WIN32)
elseif (UNIX) elseif (UNIX)
list(APPEND src list(APPEND sources
CArchConsoleUnix.cpp CArchConsoleUnix.cpp
CArchDaemonUnix.cpp CArchDaemonUnix.cpp
CArchFileUnix.cpp CArchFileUnix.cpp
@ -88,7 +88,7 @@ elseif (UNIX)
endif() endif()
set(inc include_directories(
../base ../base
../common ../common
../mt ../mt
@ -97,11 +97,10 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
../arch ../arch
) )
endif() endif()
include_directories(${inc}) add_library(arch STATIC ${sources})
add_library(arch STATIC ${src})

View File

@ -14,51 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CEvent.h file(GLOB sources "*.cpp")
CEventQueue.h
CEventTypes.h
CFunctionEventJob.h
CFunctionJob.h
CLog.h
CPriorityQueue.h
CSimpleEventQueueBuffer.h
CStopwatch.h
CString.h
CStringUtil.h
CUnicode.h
IEventJob.h
IEventQueue.h
IEventQueueBuffer.h
IJob.h
ILogOutputter.h
LogOutputters.h
TMethodEventJob.h
TMethodJob.h
XBase.h
ELevel.h
)
set(src if (SYNERGY_ADD_HEADERS)
CEvent.cpp list(APPEND sources ${headers})
CEventQueue.cpp
CEventTypes.cpp
CFunctionEventJob.cpp
CFunctionJob.cpp
CLog.cpp
CSimpleEventQueueBuffer.cpp
CStopwatch.cpp
CStringUtil.cpp
CUnicode.cpp
LogOutputters.cpp
XBase.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../common ../common
../mt ../mt
@ -66,14 +29,13 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
../base ../base
) )
endif() endif()
include_directories(${inc}) add_library(base STATIC ${sources})
add_library(base STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(base common) target_link_libraries(base common)

View File

@ -14,21 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CClient.h file(GLOB sources "*.cpp")
CServerProxy.h
)
set(src if (SYNERGY_ADD_HEADERS)
CClient.cpp list(APPEND sources ${headers})
CServerProxy.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../base ../base
../common ../common
@ -40,14 +33,13 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(client STATIC ${sources})
add_library(client STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(client synergy io) target_link_libraries(client synergy io)

View File

@ -14,16 +14,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
Version.h file(GLOB sources "*.cpp")
)
set(src if (SYNERGY_ADD_HEADERS)
Version.cpp list(APPEND sources ${headers})
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
if (UNIX) if (UNIX)
@ -32,4 +27,4 @@ if (UNIX)
) )
endif() endif()
add_library(common STATIC ${src}) add_library(common STATIC ${sources})

View File

@ -14,32 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CStreamBuffer.h file(GLOB sources "*.cpp")
CStreamFilter.h
IStream.h
IStreamFilterFactory.h
XIO.h
CCryptoStream.h
CCryptoMode.h
ECryptoMode.h
CCryptoOptions.h
)
set(src if (SYNERGY_ADD_HEADERS)
CStreamBuffer.cpp list(APPEND sources ${headers})
CStreamFilter.cpp
XIO.cpp
CCryptoStream.cpp
CCryptoMode.cpp
CCryptoOptions.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../base ../base
../common ../common
@ -48,13 +30,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(io STATIC ${sources})
add_library(io STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(io cryptopp) target_link_libraries(io cryptopp)

View File

@ -14,31 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
Ipc.h file(GLOB sources "*.cpp")
CIpcServer.h
CIpcClient.h
CIpcServerProxy.h
CIpcClientProxy.h
CIpcMessage.h
CIpcLogOutputter.h
)
set(src if (SYNERGY_ADD_HEADERS)
Ipc.cpp list(APPEND sources ${headers})
CIpcServer.cpp
CIpcClient.cpp
CIpcServerProxy.cpp
CIpcClientProxy.cpp
CIpcMessage.cpp
CIpcLogOutputter.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../base ../base
../common ../common
@ -49,13 +32,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(ipc STATIC ${sources})
add_library(ipc STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(ipc arch base common mt io net synergy) target_link_libraries(ipc arch base common mt io net synergy)

View File

@ -14,28 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CCondVar.h file(GLOB sources "*.cpp")
CLock.h
CMutex.h
CThread.h
XMT.h
XThread.h
)
set(src if (SYNERGY_ADD_HEADERS)
CCondVar.cpp list(APPEND sources ${headers})
CLock.cpp
CMutex.cpp
CThread.cpp
XMT.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../base ../base
../common ../common
@ -43,10 +29,9 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(mt STATIC ${sources})
add_library(mt STATIC ${src})

View File

@ -14,36 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CNetworkAddress.h file(GLOB sources "*.cpp")
CSocketMultiplexer.h
CTCPListenSocket.h
CTCPSocket.h
CTCPSocketFactory.h
IDataSocket.h
IListenSocket.h
ISocket.h
ISocketFactory.h
ISocketMultiplexerJob.h
TSocketMultiplexerMethodJob.h
XSocket.h
)
set(src if (SYNERGY_ADD_HEADERS)
CNetworkAddress.cpp list(APPEND sources ${headers})
CSocketMultiplexer.cpp
CTCPListenSocket.cpp
CTCPSocket.cpp
CTCPSocketFactory.cpp
IDataSocket.cpp
XSocket.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../base ../base
../common ../common
@ -53,13 +31,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(net STATIC ${sources})
add_library(net STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(net mt io) target_link_libraries(net mt io)

View File

@ -15,88 +15,21 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
if (WIN32) if (WIN32)
file(GLOB headers "CMSWindows*.h")
set(inc file(GLOB sources "CMSWindows*.cpp")
CMSWindowsClipboard.h
CMSWindowsClipboardAnyTextConverter.h
CMSWindowsClipboardBitmapConverter.h
CMSWindowsClipboardHTMLConverter.h
CMSWindowsClipboardTextConverter.h
CMSWindowsClipboardUTF16Converter.h
CMSWindowsDesks.h
CMSWindowsEventQueueBuffer.h
CMSWindowsKeyState.h
CMSWindowsScreen.h
CMSWindowsScreenSaver.h
CMSWindowsUtil.h
CMSWindowsWatchdog.h
CMSWindowsHookLibraryLoader.h
IMSWindowsClipboardFacade.h
CMSWindowsDebugOutputter.h
CMSWindowsSession.h
)
set(src
CMSWindowsClipboard.cpp
CMSWindowsClipboardFacade.cpp
CMSWindowsClipboardAnyTextConverter.cpp
CMSWindowsClipboardBitmapConverter.cpp
CMSWindowsClipboardHTMLConverter.cpp
CMSWindowsClipboardTextConverter.cpp
CMSWindowsClipboardUTF16Converter.cpp
CMSWindowsDesks.cpp
CMSWindowsEventQueueBuffer.cpp
CMSWindowsKeyState.cpp
CMSWindowsScreen.cpp
CMSWindowsScreenSaver.cpp
CMSWindowsUtil.cpp
CMSWindowsWatchdog.cpp
CMSWindowsHookLibraryLoader.cpp
CMSWindowsDebugOutputter.cpp
CMSWindowsSession.cpp
)
list(APPEND src
${inc}
)
elseif (APPLE) elseif (APPLE)
file(GLOB headers "COSX*.h")
set(src file(GLOB sources "COSX*.cpp")
COSXClipboard.cpp
COSXClipboardAnyTextConverter.cpp
COSXClipboardTextConverter.cpp
COSXClipboardUTF16Converter.cpp
COSXEventQueueBuffer.cpp
COSXKeyState.cpp
COSXScreen.cpp
COSXScreenSaver.cpp
COSXScreenSaverUtil.m
COSXPasteboardPeeker.m
COSXDragSimulator.m
COSXDragView.m
)
elseif (UNIX) elseif (UNIX)
file(GLOB headers "CXWindows*.h")
set(src file(GLOB sources "CXWindows*.cpp")
CXWindowsClipboard.cpp
CXWindowsClipboardAnyBitmapConverter.cpp
CXWindowsClipboardBMPConverter.cpp
CXWindowsClipboardHTMLConverter.cpp
CXWindowsClipboardTextConverter.cpp
CXWindowsClipboardUCS2Converter.cpp
CXWindowsClipboardUTF8Converter.cpp
CXWindowsEventQueueBuffer.cpp
CXWindowsKeyState.cpp
CXWindowsScreen.cpp
CXWindowsScreenSaver.cpp
CXWindowsUtil.cpp
)
endif() endif()
set(inc if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
include_directories(
../arch ../arch
../base ../base
../common ../common
@ -112,7 +45,7 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
@ -124,7 +57,7 @@ if (APPLE)
endif() endif()
include_directories(${inc}) include_directories(${inc})
add_library(platform STATIC ${src}) add_library(platform STATIC ${sources})
target_link_libraries(platform client ${libs}) target_link_libraries(platform client ${libs})
if (UNIX) if (UNIX)
@ -132,6 +65,6 @@ if (UNIX)
endif() endif()
if (APPLE) if (APPLE)
FIND_LIBRARY(COCOA_LIBRARY Cocoa) find_library(COCOA_LIBRARY Cocoa)
target_link_libraries(platform ${COCOA_LIBRARY}) target_link_libraries(platform ${COCOA_LIBRARY})
endif() endif()

View File

@ -14,45 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CBaseClientProxy.h file(GLOB sources "*.cpp")
CClientListener.h
CClientProxy.h
CClientProxy1_0.h
CClientProxy1_1.h
CClientProxy1_2.h
CClientProxy1_3.h
CClientProxy1_4.h
CClientProxy1_5.h
CClientProxyUnknown.h
CConfig.h
CInputFilter.h
CPrimaryClient.h
CServer.h
)
set(src if (SYNERGY_ADD_HEADERS)
CBaseClientProxy.cpp list(APPEND sources ${headers})
CClientListener.cpp
CClientProxy.cpp
CClientProxy1_0.cpp
CClientProxy1_1.cpp
CClientProxy1_2.cpp
CClientProxy1_3.cpp
CClientProxy1_4.cpp
CClientProxy1_5.cpp
CClientProxyUnknown.cpp
CConfig.cpp
CInputFilter.cpp
CPrimaryClient.cpp
CServer.cpp
)
if (WIN32)
list(APPEND src ${inc})
endif() endif()
set(inc include_directories(
../arch ../arch
../base ../base
../common ../common
@ -64,13 +33,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(server STATIC ${sources})
add_library(server STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(server synergy) target_link_libraries(server synergy)

View File

@ -14,89 +14,26 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
CClientTaskBarReceiver.h file(GLOB sources "*.cpp")
CServerTaskBarReceiver.h
CPortableTaskBarReceiver.h
CApp.h
CClientApp.h
CServerApp.h
CClipboard.h
CKeyMap.h
CKeyState.h
CPacketStreamFilter.h
CPlatformScreen.h
CProtocolUtil.h
CScreen.h
ClipboardTypes.h
IClient.h
IClipboard.h
IKeyState.h
IPlatformScreen.h
IPrimaryScreen.h
IScreen.h
IScreenSaver.h
ISecondaryScreen.h
KeyTypes.h
MouseTypes.h
OptionTypes.h
ProtocolTypes.h
XScreen.h
XSynergy.h
CDaemonApp.h
CAppUtil.h
CArgsBase.h
IAppUtil.h
CFileChunker.h
CDragInformation.h
CToolApp.h
)
set(src # remove files which are not cross platform
CClientTaskBarReceiver.cpp list(REMOVE_ITEM headers "*Windows*")
CServerTaskBarReceiver.cpp list(REMOVE_ITEM headers "*Unix*")
CPortableTaskBarReceiver.cpp
CApp.cpp
CClientApp.cpp
CServerApp.cpp
CClipboard.cpp
CKeyMap.cpp
CKeyState.cpp
CPacketStreamFilter.cpp
CPlatformScreen.cpp
CProtocolUtil.cpp
CScreen.cpp
IClipboard.cpp
IKeyState.cpp
IPrimaryScreen.cpp
KeyTypes.cpp
ProtocolTypes.cpp
XScreen.cpp
XSynergy.cpp
CDaemonApp.cpp
CAppUtil.cpp
CArgsBase.cpp
CFileChunker.cpp
CDragInformation.cpp
CToolApp.cpp
)
# arch
if (WIN32) if (WIN32)
list(APPEND inc file(GLOB arch_sources "*Windows*.cpp")
CAppUtilWindows.h file(GLOB arch_headers "*Windows*.h")
) elseif (UNIX)
file(GLOB arch_sources "*Unix*.cpp")
list(APPEND src file(GLOB arch_headers "*Unix*.h")
${inc}
CAppUtilWindows.cpp
)
elseif(UNIX)
list(APPEND src
CAppUtilUnix.cpp
)
endif() endif()
set(inc list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
include_directories(
../arch ../arch
../base ../base
../client ../client
@ -115,13 +52,12 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_library(synergy STATIC ${sources})
add_library(synergy STATIC ${src})
if (UNIX) if (UNIX)
target_link_libraries(synergy arch client ipc net base platform mt server) target_link_libraries(synergy arch client ipc net base platform mt server)

View File

@ -13,25 +13,19 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(headers file(GLOB headers "*.h")
synwinhk.h file(GLOB sources "*.cpp")
)
set(source if (SYNERGY_ADD_HEADERS)
synwinhk.cpp list(APPEND sources ${headers})
) endif()
list(APPEND source include_directories(
${headers}
)
set(includes
../common ../common
../synergy ../synergy
) )
include_directories(${includes}) add_library(synwinhk SHARED ${sources})
add_library(synwinhk SHARED ${source})
# copy the dlls (and supporting files) from the lib dir to # copy the dlls (and supporting files) from the lib dir to
# the bin dir, so that synergyc and synergys can easily find them. # the bin dir, so that synergyc and synergys can easily find them.

View File

@ -13,31 +13,20 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(headers file(GLOB headers "*.h")
CClassFactory.h file(GLOB sources "*.cpp" "*.def")
CDataHandlerExtension.h
synwinxt.h
)
set(source if (SYNERGY_ADD_HEADERS)
CClassFactory.cpp list(APPEND sources ${headers})
CDataHandlerExtension.cpp endif()
synwinxt.cpp
synwinxt.def
)
list(APPEND source include_directories(
${headers}
)
set(includes
../arch ../arch
../base ../base
../common ../common
) )
include_directories(${includes}) add_library(synwinxt SHARED ${sources})
add_library(synwinxt SHARED ${source})
target_link_libraries(synwinxt target_link_libraries(synwinxt
arch base common ${libs}) arch base common ${libs})

View File

@ -14,12 +14,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src file(GLOB headers "*.h")
uSynergy.c file(GLOB sources "*.c")
)
if (WIN32) if (SYNERGY_ADD_HEADERS)
list(APPEND src uSynergy.h) list(APPEND sources ${headers})
endif() endif()
add_library(micro STATIC ${src}) add_library(micro STATIC ${sources})

View File

@ -14,16 +14,14 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc file(GLOB headers "*.h")
winmmjoy.h file(GLOB sources "*.cpp")
)
set(src if (SYNERGY_ADD_HEADERS)
winmmjoy.cpp list(APPEND sources ${headers})
${inc} endif()
)
add_library(winmmjoy SHARED ${inc} ${src}) add_library(winmmjoy SHARED ${sources})
add_custom_command( add_custom_command(
TARGET winmmjoy TARGET winmmjoy

View File

@ -14,51 +14,41 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(h file(GLOB headers "*.h")
CTestEventQueue.h file(GLOB sources "*.cpp")
)
set(src
${h}
Main.cpp
CIpcTests.cpp
NetworkTests.cpp
CTestEventQueue.cpp
)
# arch # arch
if (WIN32) if (WIN32)
list(APPEND src file(GLOB arch_sources "arch/CArchWindows*.cpp")
arch/CArchInternetWindowsTests.cpp file(GLOB arch_headers "arch/CArchWindows*.h")
)
elseif (UNIX) elseif (UNIX)
list(APPEND src file(GLOB arch_sources "arch/CArchUnix*.cpp")
arch/CArchInternetUnixTests.cpp file(GLOB arch_headers "arch/CArchUnix*.h")
)
endif() endif()
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
# platform # platform
if (WIN32) if (WIN32)
list(APPEND src file(GLOB platform_sources "platform/CMSWindows*.cpp")
platform/CMSWindowsClipboardTests.cpp file(GLOB platform_headers "platform/CMSWindows*.h")
platform/CMSWindowsKeyStateTests.cpp
)
elseif (APPLE) elseif (APPLE)
list(APPEND src file(GLOB platform_sources "platform/COSX*.cpp")
platform/COSXClipboardTests.cpp file(GLOB platform_headers "platform/COSX*.h")
platform/COSXKeyStateTests.cpp
platform/COSXScreenTests.cpp
)
elseif (UNIX) elseif (UNIX)
list(APPEND src file(GLOB platform_sources "platform/CXWindows*.cpp")
platform/CXWindowsClipboardTests.cpp file(GLOB platform_headers "platform/CXWindows*.h")
platform/CXWindowsKeyStateTests.cpp
platform/CXWindowsScreenTests.cpp
platform/CXWindowsScreenSaverTests.cpp
)
endif() endif()
set(inc list(APPEND sources ${platform_sources})
list(APPEND headers ${platform_headers})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
include_directories(
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/client ../../lib/client
@ -78,12 +68,11 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) add_executable(integtests ${sources})
add_executable(integtests ${src})
target_link_libraries(integtests target_link_libraries(integtests
arch base client common io ipc mt net platform server synergy gtest gmock cryptopp ${libs}) arch base client common io ipc mt net platform server synergy gtest gmock cryptopp ${libs})

View File

@ -14,31 +14,10 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(h file(GLOB_RECURSE headers "*.h")
synergy/CKeyStateTests.h file(GLOB_RECURSE sources "*.cpp")
synergy/CMockEventQueue.h
synergy/CMockKeyMap.h
client/CMockClient.h
io/CMockStream.h
server/CMockServer.h
io/CMockCryptoStream.h
synergy/CMockScreen.h
server/CMockConfig.h
server/CMockPrimaryClient.h
server/CMockInputFilter.h
)
set(src include_directories(
${h}
Main.cpp
synergy/CClipboardTests.cpp
synergy/CKeyStateTests.cpp
client/CServerProxyTests.cpp
synergy/CCryptoStreamTests.cpp
server/CClientProxyTests.cpp
)
set(inc
../../lib/arch ../../lib/arch
../../lib/base ../../lib/base
../../lib/client ../../lib/client
@ -57,12 +36,15 @@ set(inc
) )
if (UNIX) if (UNIX)
list(APPEND inc include_directories(
../../.. ../../..
) )
endif() endif()
include_directories(${inc}) if (SYNERGY_ADD_HEADERS)
add_executable(unittests ${src}) list(APPEND sources ${headers})
endif()
add_executable(unittests ${sources})
target_link_libraries(unittests target_link_libraries(unittests
arch base client server common io net platform server synergy mt gtest gmock cryptopp ${libs}) arch base client server common io net platform server synergy mt gtest gmock cryptopp ${libs})