diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d63aa3e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build +vcpkg_installed +CMakeCache.txt +CMakeFiles diff --git a/.gitmodules b/.gitmodules index a0a57f3..55b057f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5329379 --- /dev/null +++ b/CMakeLists.txt @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..94c4a31 --- /dev/null +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..3b03c30 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,5 @@ +#include + +int int main(int argc, char *argv[]) { + std::cout << "Hello, world!" << std::endl; +} diff --git a/vcpkg b/vcpkg index 3508985..86fba13 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 3508985146f1b1d248c67ead13f8f54be5b4f5da +Subproject commit 86fba13068f1e8111e7d885de2aef11378435139 diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..46d529a --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "txtv", + "version-string": "0.1.0", + "dependencies": [ + "libxml2", + "cpr" + ] +}