2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 06:42:27 +00:00

Visual Studio compatibility fixes

Static linking fix
This commit is contained in:
Guillaume Dumont
2015-09-16 10:05:43 -04:00
parent 9e53eb2c23
commit f753f4bc30

View File

@@ -43,7 +43,17 @@ message( STATUS "Boost Paths:")
message( STATUS "Include : " ${Boost_INCLUDE_DIRS})
message( STATUS "Libraries: " ${Boost_LIBRARIES})
# add_definitions( -DBOOST_ALL_NO_LIB )
if(MSVC)
# With Visual Studio remove the automatic linking
# feature
add_definitions( -DBOOST_ALL_NO_LIB )
endif()
if(Boost_USE_STATIC_LIBS)
# if the user specified he wants to link to static libraries
# force linking to static boost python
add_definitions( -DBOOST_PYTHON_STATIC_LIB )
endif()
# In some cases, you may need to explicitly specify that a dynamic Boost is used; if so use:
# add_definitions( -DBOOST_ALL_DYN_LINK )