From f3ee79c2c366f79e3e59b5deec438d4145e12cd3 Mon Sep 17 00:00:00 2001
From: "A. Maitland Bottoms" <bottoms@debian.org>
Date: Sun, 4 Sep 2022 21:20:13 -0400
Subject: [PATCH] omit build path

Have CMake filter out build path from COMPILER_INFO
before using the string in constants.c

Signed-off-by: A. Maitland Bottoms <bottoms@debian.org>
---
 lib/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 75055ee..412cb11 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -454,6 +454,7 @@ message(STATUS "Loading version ${VERSION} into constants...")
 
 #double escape for windows backslash path separators
 string(REPLACE "\\" "\\\\" prefix "${prefix}")
+string(REPLACE "${CMAKE_SOURCE_DIR}" "$BUILD_DIR" COMPILER_INFO "${COMPILER_INFO}")
 
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/constants.c.in
-- 
2.35.1

