mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 07:22:21 +08:00
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:
@@ -14,51 +14,41 @@
|
||||
# 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(h
|
||||
CTestEventQueue.h
|
||||
)
|
||||
|
||||
set(src
|
||||
${h}
|
||||
Main.cpp
|
||||
CIpcTests.cpp
|
||||
NetworkTests.cpp
|
||||
CTestEventQueue.cpp
|
||||
)
|
||||
file(GLOB headers "*.h")
|
||||
file(GLOB sources "*.cpp")
|
||||
|
||||
# arch
|
||||
if (WIN32)
|
||||
list(APPEND src
|
||||
arch/CArchInternetWindowsTests.cpp
|
||||
)
|
||||
file(GLOB arch_sources "arch/CArchWindows*.cpp")
|
||||
file(GLOB arch_headers "arch/CArchWindows*.h")
|
||||
elseif (UNIX)
|
||||
list(APPEND src
|
||||
arch/CArchInternetUnixTests.cpp
|
||||
)
|
||||
file(GLOB arch_sources "arch/CArchUnix*.cpp")
|
||||
file(GLOB arch_headers "arch/CArchUnix*.h")
|
||||
endif()
|
||||
|
||||
list(APPEND sources ${arch_sources})
|
||||
list(APPEND headers ${arch_headers})
|
||||
|
||||
# platform
|
||||
if (WIN32)
|
||||
list(APPEND src
|
||||
platform/CMSWindowsClipboardTests.cpp
|
||||
platform/CMSWindowsKeyStateTests.cpp
|
||||
)
|
||||
file(GLOB platform_sources "platform/CMSWindows*.cpp")
|
||||
file(GLOB platform_headers "platform/CMSWindows*.h")
|
||||
elseif (APPLE)
|
||||
list(APPEND src
|
||||
platform/COSXClipboardTests.cpp
|
||||
platform/COSXKeyStateTests.cpp
|
||||
platform/COSXScreenTests.cpp
|
||||
)
|
||||
file(GLOB platform_sources "platform/COSX*.cpp")
|
||||
file(GLOB platform_headers "platform/COSX*.h")
|
||||
elseif (UNIX)
|
||||
list(APPEND src
|
||||
platform/CXWindowsClipboardTests.cpp
|
||||
platform/CXWindowsKeyStateTests.cpp
|
||||
platform/CXWindowsScreenTests.cpp
|
||||
platform/CXWindowsScreenSaverTests.cpp
|
||||
)
|
||||
file(GLOB platform_sources "platform/CXWindows*.cpp")
|
||||
file(GLOB platform_headers "platform/CXWindows*.h")
|
||||
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/base
|
||||
../../lib/client
|
||||
@@ -78,12 +68,11 @@ set(inc
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
include_directories(
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_executable(integtests ${src})
|
||||
add_executable(integtests ${sources})
|
||||
target_link_libraries(integtests
|
||||
arch base client common io ipc mt net platform server synergy gtest gmock cryptopp ${libs})
|
||||
|
||||
@@ -14,31 +14,10 @@
|
||||
# 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(h
|
||||
synergy/CKeyStateTests.h
|
||||
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
|
||||
)
|
||||
file(GLOB_RECURSE headers "*.h")
|
||||
file(GLOB_RECURSE sources "*.cpp")
|
||||
|
||||
set(src
|
||||
${h}
|
||||
Main.cpp
|
||||
synergy/CClipboardTests.cpp
|
||||
synergy/CKeyStateTests.cpp
|
||||
client/CServerProxyTests.cpp
|
||||
synergy/CCryptoStreamTests.cpp
|
||||
server/CClientProxyTests.cpp
|
||||
)
|
||||
|
||||
set(inc
|
||||
include_directories(
|
||||
../../lib/arch
|
||||
../../lib/base
|
||||
../../lib/client
|
||||
@@ -57,12 +36,15 @@ set(inc
|
||||
)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND inc
|
||||
include_directories(
|
||||
../../..
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${inc})
|
||||
add_executable(unittests ${src})
|
||||
if (SYNERGY_ADD_HEADERS)
|
||||
list(APPEND sources ${headers})
|
||||
endif()
|
||||
|
||||
add_executable(unittests ${sources})
|
||||
target_link_libraries(unittests
|
||||
arch base client server common io net platform server synergy mt gtest gmock cryptopp ${libs})
|
||||
|
||||
Reference in New Issue
Block a user