This commit is contained in:
Love 2024-09-16 15:02:23 +02:00
parent 2c97228e3e
commit 3973c7f6bb
7 changed files with 41 additions and 1 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
build
vcpkg_installed
CMakeCache.txt
CMakeFiles

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/microsoft/vcpkg.git
[submodule "--force"]
path = --force
url = https://github.com/microsoft/vcpkg.git

14
CMakeLists.txt Normal file
View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.20)
# Use Ninja by default
if (NOT CMAKE_GENERATOR)
set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)
endif()
# Set the vcpkg toolchain file before project()
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "Vcpkg toolchain file")
project(txtv)
add_subdirectory(src)

6
src/CMakeLists.txt Normal file
View File

@ -0,0 +1,6 @@
find_package(LibXml2 REQUIRED)
find_package(cpr CONFIG REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE LibXml2::LibXml2 cpr::cpr)

5
src/main.cpp Normal file
View File

@ -0,0 +1,5 @@
#include <iostream>
int int main(int argc, char *argv[]) {
std::cout << "Hello, world!" << std::endl;
}

2
vcpkg

@ -1 +1 @@
Subproject commit 3508985146f1b1d248c67ead13f8f54be5b4f5da
Subproject commit 86fba13068f1e8111e7d885de2aef11378435139

8
vcpkg.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "txtv",
"version-string": "0.1.0",
"dependencies": [
"libxml2",
"cpr"
]
}