|
| 1 | +# barrier -- mouse and keyboard sharing utility |
| 2 | +# Copyright (C) 2012-2016 Symless Ltd. |
| 3 | +# Copyright (C) 2009 Nick Bolton |
| 4 | +# |
| 5 | +# This package is free software; you can redistribute it and/or |
| 6 | +# modify it under the terms of the GNU General Public License |
| 7 | +# found in the file LICENSE that should have accompanied this file. |
| 8 | +# |
| 9 | +# This package is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +# GNU General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU General Public License |
| 15 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +set(sources |
| 18 | + barriers.cpp |
| 19 | +) |
| 20 | + |
| 21 | +if (WIN32) |
| 22 | + file(GLOB arch_headers "MSWindows*.h") |
| 23 | + file(GLOB arch_sources "MSWindows*.cpp") |
| 24 | + list(APPEND sources |
| 25 | + barriers.rc |
| 26 | + barriers.exe.manifest) |
| 27 | +elseif (APPLE) |
| 28 | + file(GLOB arch_headers "OSX*.h") |
| 29 | + file(GLOB arch_sources "OSX*.cpp") |
| 30 | +elseif (UNIX) |
| 31 | + file(GLOB arch_headers "XWindows*.h") |
| 32 | + file(GLOB arch_sources "XWindows*.cpp") |
| 33 | +endif() |
| 34 | + |
| 35 | +list(APPEND sources ${arch_sources}) |
| 36 | +list(APPEND headers ${arch_headers}) |
| 37 | + |
| 38 | +if (BARRIER_ADD_HEADERS) |
| 39 | + list(APPEND sources ${headers}) |
| 40 | +endif() |
| 41 | + |
| 42 | +add_executable(barriers ${sources}) |
| 43 | +target_link_libraries(barriers |
| 44 | + arch base client common io mt net ipc platform server synlib ${libs} ${OPENSSL_LIBS}) |
| 45 | + |
| 46 | +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
| 47 | + install (TARGETS barriers DESTINATION ${BARRIER_BUNDLE_BINARY_DIR}) |
| 48 | +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
| 49 | + install (TARGETS barriers DESTINATION bin) |
| 50 | +endif() |
0 commit comments