From 359422c97cce93bbb27051f9df3efb45bd0b9052 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 23 Aug 2025 11:18:44 +0200 Subject: settings file writing --- libs/xml.c/CMakeLists.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 libs/xml.c/CMakeLists.txt (limited to 'libs/xml.c/CMakeLists.txt') diff --git a/libs/xml.c/CMakeLists.txt b/libs/xml.c/CMakeLists.txt new file mode 100644 index 0000000..698dc78 --- /dev/null +++ b/libs/xml.c/CMakeLists.txt @@ -0,0 +1,51 @@ +# Project setup +project(xml C CXX) +set(VERSION_MAJOR "0") +set(VERSION_MINOR "2") +set(VERSION_PATCH "0") +cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) + + +# Define main library target +add_library(xml STATIC "") + + +# Compiler setup +target_compile_options( + xml + PRIVATE + -std=c11 +) + + +# Options +option(XML_PARSER_VERBOSE "Enable to be told everything the xml parser does" OFF) + +if(XML_PARSER_VERBOSE) + target_compile_definitions( + xml + PRIVATE + XML_PARSER_VERBOSE + ) +endif(XML_PARSER_VERBOSE) + + +# Sources +target_sources( + xml + PRIVATE + "${CMAKE_CURRENT_LIST_DIR}/src/xml.c" +) + + +target_include_directories( + xml + PUBLIC + "${CMAKE_CURRENT_LIST_DIR}/src/" +) + + +# Build unit cases +enable_testing() +add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test") + -- cgit v1.2.3-70-g09d2