> Hi all,
>
> I have been trying to compile a very simple example with cmake (2.8.5) and
> boost, and I can't get what I am doing wrong...
>
> CMakeLists.txt
> ----------------------
>
> cmake_minimum_required(VERSION 2.6)
>
> project(ReadGraph)
>
> find_package(Boost 1.46 COMPONENTS graph regex )
Maybe you need to add 1.46.0 here?
> link_directories(${Boost_LIBRARY_DIRS})
This is wrong. You don't need link_directories().
> include_directories(BEFORE ${Boost_INCLUDE_DIRS})
>
> add_executable(ReadGraph ReadGraph.cpp)
> target_link_libraries(ReadGraph ${Boost_LIBRARIES} )
> # target_link_libraries(ReadGraph boost_graph boost_regex )
Please use a clean build directory and add "-D Boost_DEBUG=On" to your
command line. Then look at the configuration output. If you do not find
what's going wrong paste it here.
Eike
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake