I am actually losing my mind here. No matter what I do my VS CMake project will never find the bsoncxx, Please see the error.
`Severity Code Description Project File Line Suppression State Details
Error rebuilding ‘build.ninja’: subcommand failed C:\Repos\InvokeInvoiceSystem\out\build\x64-debug\InvokeInvoiceSystem C:\Repos\InvokeInvoiceSystem\out\build\x64-debug\ninja 1
Error CMake Error at C:\Repos\InvokeInvoiceSystem\CMakeLists.txt:18 (find_package):
Could not find a package configuration file provided by “bsoncxx” with any
of the following names:
bsoncxxConfig.cmake
bsoncxx-config.cmake
Add the installation prefix of “bsoncxx” to CMAKE_PREFIX_PATH or set
“bsoncxx_DIR” to a directory containing one of the above files. If
“bsoncxx” provides a separate development package or SDK, be sure it has
been installed. InvokeInvoiceSystem C:\Repos\InvokeInvoiceSystem\CMakeLists.txt 18`
`cmake_minimum_required(VERSION 3.8)
project(InvokeInvoiceSystem LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
bcrypt hashing library
add_library(bcrypt STATIC
src/Accounts/PasswordHashing/bcrypt.cpp
src/Accounts/PasswordHashing/blowfish.cpp
)
target_include_directories(bcrypt PUBLIC
src/Accounts/PasswordHashing
${CMAKE_CURRENT_SOURCE_DIR}/include
)
Find the MongoDB C++ driver via its CMake config packages
find_package(bsoncxx REQUIRED CONFIG)
find_package(mongocxx REQUIRED CONFIG)
add_executable(${PROJECT_NAME}
src/InvokeInvoiceSystem.cpp
src/Accounts/AccountManager.cpp
src/Accounts/User.cpp
src/System/InvoiceSystem.cpp
src/System/Menu/MainMenu.cpp
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
bcrypt
bsoncxx::bsoncxx_shared
mongocxx::mongocxx_shared
)
optional precompiled header
target_precompile_headers(${PROJECT_NAME} PRIVATE include/pch.h)
`
here is my CMAke file I am willing to show my folder structure, I tried PKG which worked in the CLI but I would like my VS to make an EXE. its actually disgusting.