Skip to content

Commit

Permalink
CMake build for xmlpatch library and xml_patch tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
bilke committed Mar 5, 2021
1 parent c450d3c commit 9d4d91a
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.13)
project(xmlpatch VERSION 0.4.0)

find_package(LibXml2 REQUIRED)

set(VERSION ${PROJECT_VERSION})
configure_file(cmake_config.h.in ${PROJECT_BINARY_DIR}/config.h)

add_library(xmlpatch src/xml_patch.c)
target_link_libraries(xmlpatch PUBLIC LibXml2::LibXml2)
target_include_directories(xmlpatch INTERFACE src PRIVATE ${PROJECT_BINARY_DIR})

add_executable(xml_patch tests/xml_patch_main.c)
target_link_libraries(xml_patch xmlpatch)
target_include_directories(xml_patch PRIVATE ${PROJECT_BINARY_DIR})
62 changes: 62 additions & 0 deletions cmake_config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* config.h.in. Generated from configure.in by autoheader. */

/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine01 HAVE_DLFCN_H

/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine01 HAVE_INTTYPES_H

/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine01 HAVE_MEMORY_H

/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine01 HAVE_STDINT_H

/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine01 HAVE_STDLIB_H

/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine01 HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#cmakedefine01 HAVE_STRING_H

/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine01 HAVE_SYS_STAT_H

/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine01 HAVE_SYS_TYPES_H

/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine01 HAVE_UNISTD_H

/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#cmakedefine LT_OBJDIR

/* Name of package */
#cmakedefine PACKAGE

/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT

/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME

/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING

/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME

/* Define to the home page for this package. */
#cmakedefine PACKAGE_URL

/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION

/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS

/* Version number of package */
#cmakedefine VERSION "@VERSION@"

0 comments on commit 9d4d91a

Please sign in to comment.