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

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

View File

@@ -14,51 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc
CEvent.h
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
)
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
set(src
CEvent.cpp
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})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
set(inc
include_directories(
../arch
../common
../mt
@@ -66,14 +29,13 @@ set(inc
)
if (UNIX)
list(APPEND inc
include_directories(
../../..
../base
)
endif()
include_directories(${inc})
add_library(base STATIC ${src})
add_library(base STATIC ${sources})
if (UNIX)
target_link_libraries(base common)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,45 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc
CBaseClientProxy.h
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
)
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
set(src
CBaseClientProxy.cpp
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})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
set(inc
include_directories(
../arch
../base
../common
@@ -64,13 +33,12 @@ set(inc
)
if (UNIX)
list(APPEND inc
include_directories(
../../..
)
endif()
include_directories(${inc})
add_library(server STATIC ${src})
add_library(server STATIC ${sources})
if (UNIX)
target_link_libraries(server synergy)

View File

@@ -14,89 +14,26 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(inc
CClientTaskBarReceiver.h
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
)
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
set(src
CClientTaskBarReceiver.cpp
CServerTaskBarReceiver.cpp
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
)
# remove files which are not cross platform
list(REMOVE_ITEM headers "*Windows*")
list(REMOVE_ITEM headers "*Unix*")
# arch
if (WIN32)
list(APPEND inc
CAppUtilWindows.h
)
list(APPEND src
${inc}
CAppUtilWindows.cpp
)
elseif(UNIX)
list(APPEND src
CAppUtilUnix.cpp
)
file(GLOB arch_sources "*Windows*.cpp")
file(GLOB arch_headers "*Windows*.h")
elseif (UNIX)
file(GLOB arch_sources "*Unix*.cpp")
file(GLOB arch_headers "*Unix*.h")
endif()
set(inc
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
include_directories(
../arch
../base
../client
@@ -115,13 +52,12 @@ set(inc
)
if (UNIX)
list(APPEND inc
include_directories(
../../..
)
endif()
include_directories(${inc})
add_library(synergy STATIC ${src})
add_library(synergy STATIC ${sources})
if (UNIX)
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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(headers
synwinhk.h
)
file(GLOB headers "*.h")
file(GLOB sources "*.cpp")
set(source
synwinhk.cpp
)
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
list(APPEND source
${headers}
)
set(includes
include_directories(
../common
../synergy
)
include_directories(${includes})
add_library(synwinhk SHARED ${source})
add_library(synwinhk SHARED ${sources})
# copy the dlls (and supporting files) from the lib dir to
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(headers
CClassFactory.h
CDataHandlerExtension.h
synwinxt.h
)
file(GLOB headers "*.h")
file(GLOB sources "*.cpp" "*.def")
set(source
CClassFactory.cpp
CDataHandlerExtension.cpp
synwinxt.cpp
synwinxt.def
)
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
list(APPEND source
${headers}
)
set(includes
include_directories(
../arch
../base
../common
)
include_directories(${includes})
add_library(synwinxt SHARED ${source})
add_library(synwinxt SHARED ${sources})
target_link_libraries(synwinxt
arch base common ${libs})