0

I am using VSCode with CMake under Windows and added the following to settings.json to use vcpkg:

{
    "cmake.configureSettings": {
        "CMAKE_TOOLCHAIN_FILE": "C:/Program Files/vcpkg/scripts/buildsystems/vcpkg.cmake"
    }
}

And this is in CMakeList.txt to use boolinq:

cmake_minimum_required(VERSION 3.0.0)
project(passwordtest VERSION 0.1.0)

include(CTest)
enable_testing()

add_executable(passwordtest main.cpp)

find_path(BOOLINQ_INCLUDE_DIRS "boolinq/boolinq.h")
target_include_directories(passwordtest PRIVATE ${BOOLINQ_INCLUDE_DIRS})

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

And this is my main.cpp:

#include <iostream>
#include <boolinq/boolinq.h>

int main(int, char**) {
    std::cout << "Hello, world!\n";
}

But the line with the #include <boolinq/boolinq.h> is underlined in red and it says: The file "source" cannot be opened: "boolinq/boolinq.h" Can someone help me with this problem? I would be grateful for any help.

0 Answers0