By default Visual Studio uses automatic linking. When using CMake this is undesirable since the CMake code links the libraries to the appropriate libraries using target_link_libraries. Adding add_definitions( -DBOOST_ALL_NO_LIB ) fixes this
If the user specifies we should use static boost libraries we need to specify -DBOOST_PYTHON_STATIC_LIB as the default is to use dynamic linking.
Hi,
Here are some improvements for Visual Studio:
target_link_libraries
. Addingadd_definitions( -DBOOST_ALL_NO_LIB )
fixes this-DBOOST_PYTHON_STATIC_LIB
as the default is to use dynamic linking.