Re: [CMake] [Boost-users] link error in Visual Studio when using boost from CMake

2012-05-01 Thread Hui Wang
Yes, target_link_libraries works well, I had problem before because I used find_package(Boost) instead of find_package(Boost COMPONENTS thread), so when I used target_link_libraries( MyProject ${Boost_LIBRARIES} ), it didn't link anything, after I specify the components in find_package, it has no p

Re: [CMake] [Boost-users] link error in Visual Studio when using boost from CMake

2012-04-30 Thread Hui Wang
t > you still need to add the boost libraries in a target_link_libraries() > command? (Or whatever command is usedbto indicate the libraries to link > with). > > A > On Apr 30, 2012 2:49 PM, "Hui Wang" wrote: > >> Hello, >> >> I'm u

[CMake] link error in Visual Studio when using boost from CMake

2012-04-30 Thread Hui Wang
Hello, I'm using CMake generated Visual Studio solution, and I added boost with find_package(Boost), before that I used commands: set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) after that I used commands: include_directories(${Boost_INCLUDE_DIR}) ad