From cbc9993b502a21388eac7218b105b60a8a71150c Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 20 Mar 2023 21:23:28 +0100 Subject: docs: Enable stand-alone building --- CMakeLists.txt | 4 +++- cmake/LedgerVersion.cmake | 5 ----- doc/CMakeLists.txt | 6 ++++-- doc/LedgerVersion.cmake | 5 +++++ 4 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 cmake/LedgerVersion.cmake create mode 100644 doc/LedgerVersion.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 27a4d1de..7ac58cda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,11 @@ cmake_minimum_required(VERSION 3.0) PROJECT(ledger) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/doc") +include(LedgerVersion) + # 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") diff --git a/cmake/LedgerVersion.cmake b/cmake/LedgerVersion.cmake deleted file mode 100644 index a6481c6f..00000000 --- a/cmake/LedgerVersion.cmake +++ /dev/null @@ -1,5 +0,0 @@ -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 a13eeb92..08132224 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -7,13 +7,15 @@ cmake_minimum_required(VERSION 3.0) +project(ledger NONE) + # Point CMake at any custom modules we may ship -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}") include(LedgerVersion) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/version.texi.in - ${PROJECT_BINARY_DIR}/doc/version.texi) + ${CMAKE_CURRENT_SOURCE_DIR}/version.texi) if (USE_DOXYGEN) find_package(Doxygen) diff --git a/doc/LedgerVersion.cmake b/doc/LedgerVersion.cmake new file mode 100644 index 00000000..a6481c6f --- /dev/null +++ b/doc/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) -- cgit v1.2.3