find_package(Qt5Core 5.4 REQUIRED) set(example_SRCS main.cpp ) add_executable(example ${example_SRCS}) target_link_libraries(example PUBLIC plugman Qt5::Core Qt5::Quick ) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/plugins DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Main.qml DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) set(service_SRCS NotifySendService.cpp ) add_library(notify-service SHARED ${service_SRCS}) target_link_libraries(notify-service PUBLIC plugman Qt5::Core ) set_target_properties(notify-service PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/plugins)