CPM was added to CMake

This commit is contained in:
2024-07-09 16:00:04 +07:00
parent c705b07972
commit 580c9e47dc
2 changed files with 28 additions and 4 deletions

View File

@@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.12)
project(cyberiadaml VERSION 1.0)
find_package(LibXml2 REQUIRED)
if(!LibXml2_FOUND)
message(FATAL_ERROR "Cannot find libxml2 library")
endif()
include(cmake/CPM.cmake)
CPMUsePackageLock(package-lock.cmake)
CPMAddPackage("gh:GNOME/libxml2@2.13.2")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG__")