Cmake could not find boost_python
问题 I am trying to build this simple boost python demo from this link on my MacOS High Sierra. Following is the hello_ext.cpp : #include <boost/python.hpp> char const* greet() { return "hello, world"; } BOOST_PYTHON_MODULE(hello_ext) { using namespace boost::python; def("greet", greet); } Following is the CmakeLists.txt : cmake_minimum_required(VERSION 3.5) # Find python and Boost - both are required dependencies find_package(PythonLibs 2.7 REQUIRED) find_package(Boost COMPONENTS python REQUIRED)