2024-02-09 09:25:26 +08:00
|
|
|
|
if(0) #仅作为参考范例,实际上已经链接到exe中
|
2024-02-08 16:45:23 +08:00
|
|
|
|
add_library(ToClipboard MODULE pluginexample.cpp)
|
|
|
|
|
target_precompile_headers(ToClipboard REUSE_FROM pch)
|
2024-02-09 09:25:26 +08:00
|
|
|
|
set_target_properties(ToClipboard PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/plugin${bitappendix}")
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-03-28 19:26:32 +08:00
|
|
|
|
|
2024-02-09 09:25:26 +08:00
|
|
|
|
include(QtUtils.cmake)
|
|
|
|
|
msvc_registry_search()
|
2024-02-28 13:48:15 +08:00
|
|
|
|
if(Qt5_DIR)
|
|
|
|
|
find_qt5(Core Widgets)
|
|
|
|
|
#set(CMAKE_AUTOMOC ON)
|
|
|
|
|
add_library(QtLoader MODULE QtLoader.cpp)
|
|
|
|
|
#qt5_wrap_cpp(MOC_SOURCES QtLoader.h)
|
|
|
|
|
#target_sources(QtLoader PRIVATE ${MOC_SOURCES})
|
|
|
|
|
target_link_libraries(QtLoader Qt5::Widgets Qt5::Core)
|
|
|
|
|
set_target_properties(QtLoader PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/plugin${bitappendix}")
|
|
|
|
|
endif()
|