diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-23 11:18:44 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-23 11:18:44 +0200 |
| commit | 359422c97cce93bbb27051f9df3efb45bd0b9052 (patch) | |
| tree | 2e352bb852a25390d40d45e199f835d218ad497f /libs/xml.c/CMakeLists.txt | |
| parent | 8ea59863c5d13e68e080cf7612047ea4c655292c (diff) | |
settings file writing
Diffstat (limited to 'libs/xml.c/CMakeLists.txt')
| -rw-r--r-- | libs/xml.c/CMakeLists.txt | 51 |
1 files changed, 51 insertions, 0 deletions
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") + |
