cmake变量 试验


FIND_PACKAGE(PCL 1.7 REQUIRED)
FIND_PACKAGE(OpenCV 3.0.0 REQUIRED COMPONENTS core highgui calib3d)
INCLUDE_DIRECTORIES(
        ${PCL_INCLUDE_DIRS}
        ${CMAKE_CURRENT_BINARY_DIR}
        ${OpenCV_INCLUDE_DIRS}
)
MESSAGE(${PCL_INCLUDE_DIRS})
MESSAGE(${OpenCV_INCLUDE_DIRS})
MESSAGE(${PCL_LIBRARY_DIRS})
LINK_DIRECTORIES(${PCL_LIBRARY_DIRS} )
LINK_DIRECTORIES(/usr/local/lib )
ADD_DEFINITIONS(${PCL_DEFINITIONS} )

SET(DAM_PROTO ProtoDam)
EXEC_PROGRAM(protoc ${CMAKE_CURRENT_SOURCE_DIR} ARGS "--cpp_out=${CMAKE_CURRENT_BINARY_DIR}" ${DAM_PROTO}.proto)

MESSAGE(${OpenCV_INCLUDE_DIRS})

ADD_EXECUTABLE(BuildDam BuildDam.cpp ${DAM_PROTO}.pb.cc)
TARGET_LINK_LIBRARIES (BuildDam ${PCL_LIBRARIES}  protobu ${OpenCV_LIBS} )



CMakelists.txt:

MESSAGE(${PCL_INCLUDE_DIRS})
MESSAGE(${OpenCV_INCLUDE_DIRS})
MESSAGE(${PCL_LIBRARY_DIRS})

/usr/local/include/pcl-1.7/usr/include/eigen3/usr/include/usr/include/vtk-5.8
/usr/local/include/opencv/usr/local/include
/usr/local/lib
running cd "/home/nest/work_new/BuildDam/src" && protoc --cpp_out=/home/nest/work_new/BuildDam/build/src ProtoDam.proto  2>&1
/usr/local/include/opencv/usr/local/include

变量对应关系:

PCL_INCLUDE_DIRS  :  /usr/local/include/pcl-1.7/usr/include/eigen3/usr/include/usr/include/vtk-5.8

OpenCV_INCLUDE_DIRS:  /usr/local/include/opencv/usr/local/include

PCL_LIBRARY_DIRS  :  /usr/local/lib



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值