2024-07-02 10:23:56 +00:00
|
|
|
# Synergy -- mouse and keyboard sharing utility
|
|
|
|
|
# Copyright (C) 2012-2024 Symless Ltd.
|
|
|
|
|
# Copyright (C) 2009-2012 Nick Bolton
|
|
|
|
|
#
|
2012-06-10 16:50:54 +00:00
|
|
|
# This package is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
2015-05-03 02:33:52 +00:00
|
|
|
# found in the file LICENSE that should have accompanied this file.
|
2024-07-02 10:23:56 +00:00
|
|
|
#
|
2012-06-10 16:50:54 +00:00
|
|
|
# This package 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(WIN32)
|
|
|
|
|
file(GLOB headers "MSWindows*.h")
|
|
|
|
|
file(GLOB sources "MSWindows*.cpp")
|
|
|
|
|
elseif(APPLE)
|
|
|
|
|
file(GLOB headers "OSX*.h" "IOSX*.h")
|
|
|
|
|
file(GLOB sources "OSX*.cpp" "IOSX*.cpp" "OSX*.m" "OSX*.mm")
|
|
|
|
|
elseif(UNIX)
|
|
|
|
|
file(GLOB headers "XWindows*.h")
|
|
|
|
|
file(GLOB sources "XWindows*.cpp")
|
2014-02-26 17:46:02 +00:00
|
|
|
endif()
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(SYNERGY_ADD_HEADERS)
|
|
|
|
|
list(APPEND sources ${headers})
|
2012-06-10 16:50:54 +00:00
|
|
|
endif()
|
|
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(APPLE)
|
|
|
|
|
list(APPEND inc /System/Library/Frameworks)
|
2013-08-30 14:38:43 +00:00
|
|
|
endif()
|
|
|
|
|
|
2012-06-10 16:50:54 +00:00
|
|
|
include_directories(${inc})
|
2014-02-26 17:46:02 +00:00
|
|
|
add_library(platform STATIC ${sources})
|
2013-09-24 16:29:51 +00:00
|
|
|
target_link_libraries(platform client ${libs})
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(UNIX)
|
|
|
|
|
target_link_libraries(
|
|
|
|
|
platform
|
|
|
|
|
io
|
|
|
|
|
net
|
|
|
|
|
ipc
|
|
|
|
|
synlib
|
|
|
|
|
client
|
|
|
|
|
${libs})
|
2021-10-21 07:25:57 +00:00
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(NOT APPLE)
|
|
|
|
|
find_package(Qt5 COMPONENTS DBus)
|
|
|
|
|
target_link_libraries(platform Qt5::DBus)
|
|
|
|
|
endif()
|
2012-06-10 16:50:54 +00:00
|
|
|
endif()
|
2013-08-30 14:38:43 +00:00
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(APPLE)
|
|
|
|
|
find_library(COCOA_LIBRARY Cocoa)
|
|
|
|
|
target_link_libraries(platform ${COCOA_LIBRARY})
|
2013-08-30 14:38:43 +00:00
|
|
|
endif()
|