aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorambrosin <ambrosin@google.com>2022-04-27 01:16:14 -0700
committerCopybara-Service <copybara-worker@google.com>2022-04-27 01:17:00 -0700
commitf074a02f51a3029ca1e432f7549073c393832e29 (patch)
tree8a200593cdc561e445207c7d3a4130ab919d2394 /CMakeLists.txt
parentabbd9e222475d2bdc64057bfa035955c3254b86a (diff)
downloadtink-f074a02f51a3029ca1e432f7549073c393832e29.tar.gz
Set Tink version in the `project` command instead of having a separate .cmake file.
* Delete tink/tink_version.cmake * Set `VERSION` in `project` in the root CMakeLists.txt * Populate `TINK_VERSION_LABEL` with the value of `PROJECT_VERSION` for autogenerating version.h * Initialise `CPACK_PACKAGE_VERSION` with `PROJECT_VERSION`. This is needed because `CPACK_PACKAGE_VERSION` is automatically initialised to the project version only from CMake 3.12 onwards PiperOrigin-RevId: 444787583
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a0bf68fe..338a2a496 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,5 @@
cmake_minimum_required(VERSION 3.5)
-project(Tink CXX)
-
-# Deviate from the naming convention for consistency with tink_version.bzl.
-include(tink_version.cmake)
+project(Tink VERSION 1.6.1 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@@ -12,7 +9,7 @@ option(TINK_USE_INSTALLED_ABSEIL "Build Tink linking to Abseil installed in the
option(TINK_USE_INSTALLED_GOOGLETEST "Build Tink linking to GTest installed in the system" OFF)
set(CPACK_GENERATOR TGZ)
-set(CPACK_PACKAGE_VERSION ${TINK_VERSION_LABEL})
+set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
include(CPack)
include(TinkWorkspace)