-
I am trying to use Microsoft Bond package via cmake. I followed https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-cmd My cmake_minimum_required(VERSION 3.16)
set(CMAKE_CXX_STANDARD 17)
project(aig)
find_package(Python3 REQUIRED)
find_package("bond" CONFIG REQUIRED)
set(SOURCES "aig.cpp" "aig_apply.cpp" "aig_types.cpp")
set(HEADERS aig_apply.h aig_reflection.h aig_types.h)
set(LIB_NAME "aig")
add_library(${LIB_NAME} SHARED ${SOURCES} ${HEADERS})
target_include_directories(${LIB_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(${LIB_NAME} "${PYTHON_LIBRARIES}") Output after running Preset CMake variables:
CMAKE_TOOLCHAIN_FILE="C:\home\workspace\repos\vcpkg/scripts/buildsystems/vcpkg.cmake"
-- Running vcpkg install
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe
All requested packages are currently installed.
Total install time: 300 ns
-- Running vcpkg install - done
CMake Error at C:/home/workspace/repos/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
Could not find a package configuration file provided by "bond" with any of
the following names:
bondConfig.cmake
bond-config.cmake
Add the installation prefix of "bond" to CMAKE_PREFIX_PATH or set
"bond_DIR" to a directory containing one of the above files. If "bond"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:7 (find_package)
-- Configuring incomplete, errors occurred! I can see that vcpkg did indeed installed packages inside My aig.bond:
And aig.cpp:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'd say it's an upstream bug: |
Beta Was this translation helpful? Give feedback.
I'd say it's an upstream bug:
https://github.com/microsoft/bond/blob/b13fee1b760119a79d038e43fb05d88e800fc7e5/cpp/CMakeLists.txt#L93
https://github.com/microsoft/bond/blob/b13fee1b760119a79d038e43fb05d88e800fc7e5/CMakeLists.txt#L60-L62
It should've installed
bond-config.cmake
instead ofbond.cmake
.Please file a proper issue instead of discussion topic.