aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
commitbeb08eb751fa8e1f72042f263316ab5e5ddb596d (patch)
tree3b00df983527648bdae610ac7b88cb639b1f1828 /cmake
parentfbc30002ab3438356c0476e70c4577a0310d52c0 (diff)
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Version.cmake7
-rw-r--r--cmake/gtest.cmake44
2 files changed, 49 insertions, 2 deletions
diff --git a/cmake/Version.cmake b/cmake/Version.cmake
index 9683649..73524bf 100644
--- a/cmake/Version.cmake
+++ b/cmake/Version.cmake
@@ -1,8 +1,8 @@
cmake_minimum_required (VERSION 3.4)
set (BARRIER_VERSION_MAJOR 2)
-set (BARRIER_VERSION_MINOR 3)
-set (BARRIER_VERSION_PATCH 3)
+set (BARRIER_VERSION_MINOR 4)
+set (BARRIER_VERSION_PATCH 0)
set (BARRIER_VERSION_STAGE "release")
#
@@ -85,6 +85,9 @@ message (STATUS "Full Barrier version string is '" ${BARRIER_VERSION_STRING} "'"
add_definitions (-DBARRIER_VERSION="${BARRIER_VERSION}")
add_definitions (-DBARRIER_VERSION_STRING="${BARRIER_VERSION_STRING}")
+add_definitions (-DBARRIER_VERSION_MAJOR=${BARRIER_VERSION_MAJOR})
+add_definitions (-DBARRIER_VERSION_MINOR=${BARRIER_VERSION_MINOR})
+add_definitions (-DBARRIER_VERSION_PATCH=${BARRIER_VERSION_PATCH})
add_definitions (-DBARRIER_REVISION="${BARRIER_REVISION}")
add_definitions (-DBARRIER_BUILD_DATE="${BARRIER_BUILD_DATE}")
add_definitions (-DBARRIER_BUILD_NUMBER=${BARRIER_BUILD_NUMBER})
diff --git a/cmake/gtest.cmake b/cmake/gtest.cmake
new file mode 100644
index 0000000..e83491c
--- /dev/null
+++ b/cmake/gtest.cmake
@@ -0,0 +1,44 @@
+# barrier -- mouse and keyboard sharing utility
+# Copyright (C) 2012-2016 Symless Ltd.
+# Copyright (C) 2011 Nick Bolton
+#
+# This package is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# found in the file LICENSE that should have accompanied this file.
+#
+# 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/>.
+
+if (BARRIER_USE_EXTERNAL_GTEST)
+ include (FindPkgConfig)
+ find_package(GTest REQUIRED)
+ pkg_check_modules(GMOCK REQUIRED gmock)
+ include_directories(
+ ${GTEST_INCLUDE_DIRS}
+ ${GMOCK_INCLUDE_DIRS}
+ )
+else()
+ include_directories(
+ ../ext/gtest
+ ../ext/gtest/include
+ ../ext/gmock
+ ../ext/gmock/include
+ )
+
+ add_library(gtest STATIC ../ext/gtest/src/gtest-all.cc)
+ add_library(gmock STATIC ../ext/gmock/src/gmock-all.cc)
+
+ set(GTEST_LIBRARIES gtest)
+ set(GMOCK_LIBRARIES gmock)
+
+ if (UNIX)
+ # ignore warnings in gtest and gmock
+ set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
+ set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
+ endif()
+endif()