summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-03-04 11:29:53 +0100
committerMartin Michlmayr <tbm@cyrius.com>2023-03-05 09:00:56 +0800
commitb9a69d3c5b6da95c94aaedc40f5420516ec33b2e (patch)
treef3d4a431657a5f768a9700981829525022c71635 /CMakeLists.txt
parent5c107db1b5fb69245075ee324544a853637d355c (diff)
downloadfork-ledger-b9a69d3c5b6da95c94aaedc40f5420516ec33b2e.tar.gz
fork-ledger-b9a69d3c5b6da95c94aaedc40f5420516ec33b2e.tar.bz2
fork-ledger-b9a69d3c5b6da95c94aaedc40f5420516ec33b2e.zip
Refactor Ledger version info into cmake/LedgerVersion.cmake
so it can be re-used when generating the version.texi for ledger-website builds.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 3 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3dc50617..02f05809 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,17 +1,11 @@
cmake_minimum_required(VERSION 3.0)
-PROJECT(ledger)
-
-set(Ledger_VERSION_MAJOR 3)
-set(Ledger_VERSION_MINOR 3)
-set(Ledger_VERSION_PATCH 1)
-set(Ledger_VERSION_PRERELEASE "")
-set(Ledger_VERSION_DATE 20230303)
+# Point CMake at any custom modules we may ship
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
+include(LedgerVersion)
set(Ledger_TEST_TIMEZONE "America/Chicago")
-# Point CMake at any custom modules we may ship
-list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
if ((${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.7.0") AND (${CMAKE_VERSION} VERSION_LESS "3.16.0"))
# use backported module from 3.15 (introduced 3.12) to support older versions of cmake.
# this only works with cmake 3.7 or higher.