XGBoost C API Installation on Win10

Hi, I am quite new to xgboost and cmake.

I am using CMake, Anaconda and VS22 all up-to-date.

I followed the steps from C API Tutorial and did everything step by step apart from the “make install” part, even tho I have make installed on windows, it gives me an error.
I just opened the xgboost.sln in VS22 and built the solution from INSTALL -> should be the same as “make install” I guess?
How ever the next steps give me the following error which I can not solve no matter what I try to do.

cmake_minimum_required(VERSION 3.13)
project(your_project_name LANGUAGES C CXX VERSION your_project_version)
find_package(xgboost REQUIRED)
add_executable(your_project_name /path/to/project_file.c)
target_link_libraries(your_project_name xgboost::xgboost)

And here’s my error:

I did put this into my cmake-CPP-Project’s CMakeLists.txt-file but I do not know how to put in the path or projects name, I guess I did it wrong but I just don’t know how to do it right.

I am doing this as a project for uni. I am familiar with C/C++ but not with xgboost nor cmake.

If anyone knows how to properly install this for Win10 feel free to share your knowledge. ^^

Ok, so I got it working. The thing is you should not be following the manual instructions.

Just git-clone the repository, then use cmake to create the VS solution files. Go into VS and compile (INSTALL). Once the compiler is done start looking for the .dll and .lib files. Just copy paste them into your project folder where you want to use those (should be the same folder as the .exe-file). Go to VS settings and add the lib-file, the header files and the dll as you usually do.

No need to install conda. No need to create environments or use make. Just git, cmake, VS -> done.
Once you got it inside of VS you can start coding in C and compile to whatever platform you want it to run on.