FindBoost.cmake Boost 1.66 and Numpy Dependencies
I'm running Boost 1.66 compiled with only Python3 support. A simplified version of the cmake file I am currently using is as follows:
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibs 3 REQUIRED)
find_package(Boost REQUIRED python3 numpy3)
python_add_module(recon python.cpp)
target_link_libraries(recon PUBLIC Boost::python3 Boost::numpy3 ${PYTHON_LIBRARIES})
target_include_directories(recon PUBLIC ${PYTHON_INCLUDE_DIRS})
I get the error:
Target "recon" links to target "Boost::python" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
It appears from 1673923c that 1.66 is grouped with 1.65 in that python should be linked as a dependency for NumPy, not python3. This is consistent with running BoostScanDeps.cmake on Boost 1.66, but seems to fail in my case. It seems odd to need the "python" dependency, as the following will fail for me, as I haven't built against python2:
find_package(Boost REQUIRED python)
Is there perhaps something I'm doing wrong, or is BoostScanDeps perhaps getting the wrong things for 1.66?