Algomorph/pyboostcvconverter

Add work-around in CMake for Visual Studio / boost additional library directories problem

Algomorph opened this issue · 1 comments

Some of the new boost libraries now do a weird thing in Windows, where they include processor linker commands (not standard in C++) which try to link to 'someboostlib.lib' without the full path, i.e. the actual absolute path to the .lib file that is added through CMake doesn't work.

Some people who try building pbcvt on Windows are getting problems due to this issue: #17.

I'm going to be looking into making a CMake work-around for this soon, which adds the include directories as they should be added on Windows. For now, the work-around is to simply add the absolute path to the boost/libs folder in the "Additional Library Directories" to the .pbcvt project in Visual Studio.

Note to self: need to add this toCMake

if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
	set (Boost_USE_STATIC_LIBS TRUE)
	set(Boost_USE_STATIC_RUNTIME OFF)
endif()
And then:
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
	target_compile_definitions(${targetname} PUBLIC -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_NO_DEPRECATED)
endif()