标签:
########################################################
# Files
#设置源文件列表
SET(HARMONY_SRCS
harmonyprovider.cpp
harmonydataitems.cpp
harmonyconnection.cpp
)
#头文件
SET(HARMONY_MOC_HDRS
harmonyprovider.h
harmonydataitems.h
harmonyconnection.h
)
########################################################
# Build
#添加生成的MOC源文件,这些文件是根据头文件生成的
QT4_WRAP_CPP(HARMONY_MOC_SRCS ${HARMONY_MOC_HDRS})
#设置库文件目录
INCLUDE_DIRECTORIES(
#qgis core
../../core
#qgis gui
../../gui
${CMAKE_CURRENT_BINARY_DIR}/../../ui
)
#生成动态库
ADD_LIBRARY (harmonyprovider MODULE ${HARMONY_SRCS} ${HARMONY_MOC_SRCS})
#链接其他库
TARGET_LINK_LIBRARIES (harmonyprovider
qgis_core
qgis_gui
)
########################################################
# Install
#生成插件
INSTALL(TARGETS harmonyprovider
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
标签:
原文地址:http://www.cnblogs.com/dongdongweiwu/p/4343887.html