diff options
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | cmake/LedgerVersion.cmake | 5 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 8 |
3 files changed, 15 insertions, 10 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. diff --git a/cmake/LedgerVersion.cmake b/cmake/LedgerVersion.cmake new file mode 100644 index 00000000..a6481c6f --- /dev/null +++ b/cmake/LedgerVersion.cmake @@ -0,0 +1,5 @@ +set(Ledger_VERSION_MAJOR 3) +set(Ledger_VERSION_MINOR 3) +set(Ledger_VERSION_PATCH 1) +set(Ledger_VERSION_PRERELEASE "") +set(Ledger_VERSION_DATE 20230303) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index bb129415..a13eeb92 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -5,8 +5,14 @@ ######################################################################## +cmake_minimum_required(VERSION 3.0) + +# Point CMake at any custom modules we may ship +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") +include(LedgerVersion) + configure_file( - ${PROJECT_SOURCE_DIR}/doc/version.texi.in + ${CMAKE_CURRENT_SOURCE_DIR}/version.texi.in ${PROJECT_BINARY_DIR}/doc/version.texi) if (USE_DOXYGEN) |