Skip to content

Commit

Permalink
Fix: Requires field of a .pc file should require library names not files
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@209 a9d63959-f2ad-4865-b262-bf0e56cfafb6
  • Loading branch information
Nizar Sallem committed Mar 24, 2011
1 parent fe1a3a0 commit 215dcc9
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 6 deletions.
9 changes: 8 additions & 1 deletion cmake/pcl_find_boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ if(NOT PCL_SHARED_LIBS)
endif(NOT PCL_SHARED_LIBS)

find_package(Boost 1.44.0 COMPONENTS system filesystem thread)
# TODO: What should the minimum version number be?

include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})

foreach(boost_component ${Boost_LIBRARIES})
string(REGEX MATCH "boost_.*" component "${boost_component}")
if(NOT "${component}" EQUAL "")
string(REGEX REPLACE "(boost_.*)\\..*" "\\1" component "${component}")
list(APPEND boost_components ${component})
endif(NOT "${component}" EQUAL "")
endforeach(boost_component)
1 change: 1 addition & 0 deletions features/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if(build)
PCL_ADD_OPENMP_FLAGS(${LIB_NAME})
target_link_libraries(${LIB_NAME} pcl_range_image ${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
1 change: 1 addition & 0 deletions filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if(build)
target_link_libraries(${LIB_NAME} pcl_common pcl_sample_consensus
pcl_kdtree ${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
2 changes: 1 addition & 1 deletion io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if(build)
target_link_libraries(${LIB_NAME} ${OPENNI_LIBRARIES})
endif(OPENNI_FOUND)
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${Boost_FILESYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})
list(APPEND EXT_DEPS boost_filesystem boost_thread)
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
2 changes: 1 addition & 1 deletion kdtree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(build)
PCL_ADD_SSE_FLAGS(${LIB_NAME})
target_link_libraries(${LIB_NAME} ${FLANN_LIBRARIES} ${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS flann ${Boost_LIBRARIES})
list(APPEND EXT_DEPS flann ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
1 change: 1 addition & 0 deletions registration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if(build)
target_link_libraries(${LIB_NAME} pcl_kdtree pcl_sample_consensus
${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
2 changes: 1 addition & 1 deletion sample_consensus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(build)
PCL_ADD_SSE_FLAGS(${LIB_NAME})
target_link_libraries(${LIB_NAME} ${Boost_LIBRARIES} ${CMINPACK_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${Boost_LIBRARIES} cminpack)
list(APPEND EXT_DEPS ${boost_components} cminpack)
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
1 change: 1 addition & 0 deletions segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if(build)
target_link_libraries(${LIB_NAME} pcl_kdtree pcl_sample_consensus
${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
1 change: 1 addition & 0 deletions surface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if(build)
PCL_ADD_SSE_FLAGS(${LIB_NAME})
target_link_libraries(${LIB_NAME} ${QHULL_LIBRARIES} ${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS qhull ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down
11 changes: 9 additions & 2 deletions visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ if(build)
target_link_libraries(${LIB_NAME} ${wxWidgets_LIBRARIES}
vtkCommon vtkWidgets vtkHybrid ${Boost_LIBRARIES})
PREFIX_LIST(EXT_DEPS pcl_ "${SUBSYS_DEPS}")
list(APPEND EXT_DEPS ${wxWidgets_LIBRARIES} vtkCommon vtkWidgets
vtkHybrid ${Boost_LIBRARIES})
foreach(wx_component ${wxWidgets_LIBRARIES})
string(REGEX MATCH "wx.*" component "${wx_component}")
if(NOT "${component}" EQUAL "")
string(REGEX REPLACE "(wx.*)-[0-9\\.]+" "\\1" component "${component}")
list(APPEND wx_components ${component})
endif(NOT "${component}" EQUAL "")
endforeach(wx_component)
list(APPEND EXT_DEPS ${wx_components} vtkCommon vtkWidgets
vtkHybrid ${boost_components})
PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
"${EXT_DEPS}" "" "" "")

Expand Down

0 comments on commit 215dcc9

Please sign in to comment.