Files
gcs-nf/Plugins/DeviceManage/CMakeLists.txt
T

21 lines
834 B
CMake
Raw Normal View History

# DeviceManage — 设备管理插件(共享库 / DLL)
add_library(DeviceManagePlugin SHARED
DeviceManagePlugin.h
DeviceManagePlugin.cpp
)
target_include_directories(DeviceManagePlugin PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/Plugins
${CMAKE_SOURCE_DIR}/PluginSDK
)
target_link_libraries(DeviceManagePlugin PUBLIC PluginSDK Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets)
set_target_properties(DeviceManagePlugin PROPERTIES PREFIX "" SUFFIX ".dll" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/plugins/DeviceManage")
add_custom_command(TARGET DeviceManagePlugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/plugin.json"
"${CMAKE_BINARY_DIR}/bin/plugins/DeviceManage/plugin.json"
)