ApproxMVBB
ApproxMVBB copied to clipboard
Problem using installed the library by non-system generic location
I try to link the ApproxMVBB::Core library in my own project like this:
`
--- Find MVBB dependencies
include(${CMAKE_CURRENT_SOURCE_DIR}/SetTargetCompileOptions.cmake) set(ApproxMVBB_DIR "E:/017MinimumBoundingBox/ApproxMVBB-MVBB/build/install/cmake") get_filename_component( ApproxMVBB_DIR ${ApproxMVBB_DIR} ABSOLUTE ) message(STATUS "ApproxMVBB_DIR:" ${ApproxMVBB_DIR})
Add ApproxMVBB
find_package(ApproxMVBB REQUIRED COMPONENTS XML_SUPPORT KDTREE_SUPPORT)
add_executable(${PROJECT_NAME} test_approx_mvbb.cpp) setTargetCompileOptions(${PROJECT_NAME}) target_link_libraries(${PROJECT_NAME} ApproxMVBB::Core) `
and it works well, but when I add a new library such as pcl it break down. Code in CmakeLists.txt is like this: `
--- Find PCL dependencies
find_package(PCL 1.12 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS})
--- Find MVBB dependencies
`include(${CMAKE_CURRENT_SOURCE_DIR}/SetTargetCompileOptions.cmake) set(ApproxMVBB_DIR "E:/017MinimumBoundingBox/ApproxMVBB-MVBB/build/install/cmake") get_filename_component( ApproxMVBB_DIR ${ApproxMVBB_DIR} ABSOLUTE ) message(STATUS "ApproxMVBB_DIR:" ${ApproxMVBB_DIR})
Add ApproxMVBB
find_package(ApproxMVBB REQUIRED COMPONENTS XML_SUPPORT KDTREE_SUPPORT)
link_directories(${LIBRARY_OUTPUT_PATH})
add_executable(${PROJECT_NAME} test_approx_mvbb.cpp ) setTargetCompileOptions(${PROJECT_NAME}) target_link_libraries(${PROJECT_NAME} ApproxMVBB::Core ${PCL_LIBRARIES}) `
When I using the library PCL or ApproxMVBB respectively, it works well. What is the problem?
Looking forward to your reply. Best wishes.