summaryrefslogtreecommitdiff
path: root/xdiff/0001-flesh-out-CMakeLists.txt-for-managable-build-install.patch
diff options
context:
space:
mode:
Diffstat (limited to 'xdiff/0001-flesh-out-CMakeLists.txt-for-managable-build-install.patch')
-rw-r--r--xdiff/0001-flesh-out-CMakeLists.txt-for-managable-build-install.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/xdiff/0001-flesh-out-CMakeLists.txt-for-managable-build-install.patch b/xdiff/0001-flesh-out-CMakeLists.txt-for-managable-build-install.patch
new file mode 100644
index 0000000..ef85ab9
--- /dev/null
+++ b/xdiff/0001-flesh-out-CMakeLists.txt-for-managable-build-install.patch
@@ -0,0 +1,65 @@
+From f9e099d60b7c427b69298b0e04b71d6128188397 Mon Sep 17 00:00:00 2001
+From: John Vogel <jvogel4@stny.rr.com>
+Date: Sat, 9 Sep 2023 21:23:42 -0400
+Subject: [PATCH 1/2] flesh out CMakeLists.txt for managable build/install
+
+---
+ CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 40 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 766b546..6e7e610 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,44 @@
+ cmake_minimum_required(VERSION 3.5.1)
+
+-project(xdiff VERSION "0.1" LANGUAGES C)
++project(xdiff C)
+
+-file(GLOB SRC "*.c" "*.h")
+-list(SORT SRC)
++set(XDIFF_MAJOR_VERSION 2)
++set(XDIFF_MINOR_VERSION 40)
++set(XDIFF_PATCH_VERSION 1)
+
+-add_library(xdiff OBJECT ${SRC})
++set(XDIFF_VERSION
++ ${XDIFF_MAJOR_VERSION}.${XDIFF_MINOR_VERSION}.${XDIFF_PATCH_VERSION})
++
++set(xdiff_LIB_SRCS
++ xdiffi.c
++ xemit.c
++ xhistogram.c
++ xmerge.c
++ xpatience.c
++ xprepare.c
++ xutils.c)
++
++add_library(xdiff ${xdiff_LIB_SRCS})
++
++option(BUILD_SHARED_LIBS "build a shared library" ON)
++option(BUILD_STATIC_LIBS "build a static library" OFF)
++
++install(FILES
++ git-xdiff.h
++ xdiff.h
++ xdiffi.h
++ xemit.h
++ xinclude.h
++ xmacros.h
++ xprepare.h
++ xtypes.h
++ xutils.h
++ DESTINATION include/xdiff)
++
++set_target_properties(xdiff PROPERTIES
++ VERSION ${XDIFF_VERSION}
++ SOVERSION ${XDIFF_MAJOR_VERSION}.${XDIFF_MINOR_VERSION})
++
++install(TARGETS xdiff ${INSTALL_TARGETS_DEFAULT_ARGS}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+--
+2.42.0
+