Hi Bart Please keep answers on the list, so others can also profit from the discussion.
On 02/28/2012 01:59 PM, Bart Vandewoestyne wrote: > On 02/28/2012 10:28 AM, Michael Wild wrote: >> Don't do it this way. Use this: >> >> find_package(Boost REQUIRED COMPONENTS regex) >> include_directories(${Boost_INCLUDE_DIRS}) >> >> # add_executable etc... >> >> target_link_libraries(airspace ${Boost_LIBRARIES}) > > Michael, > > Thanks for pointing me to the find_package command! One more > detail-question however: in the docs online at > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package > is the syntax written as: > > find_package(<package> [version] [EXACT] [QUIET] > [[REQUIRED|COMPONENTS] [components...]] > [NO_POLICY_SCOPE]) > > Notice the [REQUIRED|COMPONENTS] from which i deduce that the > find_package command should probably be written as > > find_package(Boost REQUIRED regex) > > I tried it, and it seems to work... > > Kind regards, > Bart You are absolutely right, I wrote my reply from memory, and got it obviously wrong ;-) Michael -- 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