diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc67843029e2d208dd956d4e387b28a13292ff11..94207277522eb771eb6c06b85c39b0f4abcd8183 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,3 +60,24 @@ install(EXPORT CsgEbConfig
 if (CSG_CGAL_ENABLED)
    target_compile_definitions(csg-eb PUBLIC USE_CGAL)
 endif()
+
+set(CSGEB_GIT_HASH "")
+execute_process(
+   COMMAND git describe --abbrev=12 --dirty --always --tags
+   WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+   OUTPUT_VARIABLE CSGEB_GIT_HASH
+   ERROR_VARIABLE  _tmperr
+   OUTPUT_STRIP_TRAILING_WHITESPACE
+   )
+if(_tmperr)
+   message(WARNING "Failing to retrieve Git commit from repo: ${PROJECT_SOURCE_DIR}")
+endif()
+set_target_properties(csg-eb PROPERTIES CSGEB_GIT_HASH ${CSGEB_GIT_HASH}
+   EXPORT_PROPERTIES CSGEB_GIT_HASH)
+
+# to be used by gnumake
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CsgEbConfig.mk 
+   "CSGEB_GIT_HASH := ${CSGEB_GIT_HASH}")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CsgEbConfig.mk
+    DESTINATION "${CMAKE_INSTALL_PREFIX}"
+)
diff --git a/GNUmakefile b/GNUmakefile
index 80d2bee68617450b31d24669f78ea33da13dcb1b..0ad76b41f01d01907535b336db4f9d55885089ff 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,6 +8,7 @@
 
 TARGET ?= libcsg-eb.a
 BUILD_DIR ?= ./build
+CONFIG_FILE ?= CsgEbConfig.mk
 
 SRCFILENAMES := csg.cpp \
 	levelset_2d.cpp \
@@ -46,11 +47,15 @@ $(BUILD_DIR)/%.cpp.o: %.cpp
 	$(MKDIR_P) $(dir $@)
 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++17 -c $< -o $@
 
+$(CONFIG_FILE): $(TARGET)
+	@echo "CSGEB_GIT_HASH := $(shell git describe --abbrev=12 --dirty --always --tags)" > $@
+
 .PHONY: install
-install: $(TARGET)
+install: $(TARGET) $(CONFIG_FILE)
 	@$(MKDIR_P) $(DESTDIR)/lib $(DESTDIR)/include
 	install -m 0755 $< $(DESTDIR)/lib
 	install -m 0755 include/*.hpp $(DESTDIR)/include
+	install -m 0755 $(CONFIG_FILE) $(DESTDIR)
 
 .PHONY: clean
 clean: