forte 的编译由cmake-gui配置生成,所以即使是在开发工具中添加引用,或者头文件引用,也是全无效果,
由于对cmake不熟,问了别人也没问出个结果,还是自己动手,才能丰衣足食。
in CMakeList.txt under forte/src ,${ADT_LIBRARIES}是静态库的路径,在gui中添加即可
if(FORTE_BUILD_EXECUTABLE) ADD_EXECUTABLE (forte $<TARGET_OBJECTS:FORTE_LITE> ${SOURCE_EXECUTABLE_CPP} ${FORTE_EXECUTABLE_H}) set_target_properties(forte PROPERTIES LINK_FLAGS "${link_flags}") TARGET_LINK_LIBRARIES (forte ${LINK_LIBRARY}) TARGET_LINK_LIBRARIES (forte ${ADT_LIBRARIES}) ADD_DEPENDENCIES (forte FORTE_LITE) install(TARGETS forte RUNTIME DESTINATION bin) message("Building executable") endif(FORTE_BUILD_EXECUTABLE)
我又添加了另外一个文件 CmakeList.txt,添加了头文件 forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR}) forte_add_sourcefile_h (ADT_Motion_Pulse.h ADT_Motion_Unit.h)
再次生成,make成功 |