find_package(Qt5Core REQUIRED) find_package(Qt5Widgets REQUIRED) find_package(Qt5WebEngineWidgets REQUIRED) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) add_library(ProfileEditorPlugin SHARED ${CMAKE_SOURCE_DIR}/include/profileinterface.h ${CMAKE_SOURCE_DIR}/include/browserinterface.h ${CMAKE_SOURCE_DIR}/include/plugininterface.h profileeditorplugin.cpp profileeditorplugin.h forms/profilemanagerdialog.cpp forms/profilemanagerdialog.h forms/profilemanagerdialog.ui forms/profileview.cpp forms/profileview.h forms/profileview.ui forms/newprofiledialog.cpp forms/newprofiledialog.h forms/newprofiledialog.ui forms/newhttpheaderdialog.cpp forms/newhttpheaderdialog.h forms/newhttpheaderdialog.ui ) target_include_directories(ProfileEditorPlugin PRIVATE ${CMAKE_SOURCE_DIR}/include ) target_link_libraries(ProfileEditorPlugin PRIVATE Qt5::Widgets PRIVATE Qt5::WebEngineWidgets ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") install(TARGETS ProfileEditorPlugin RUNTIME DESTINATION ${installPath_plugin} CONFIGURATIONS Release) else() install(TARGETS ProfileEditorPlugin LIBRARY DESTINATION ${installPath_plugin} CONFIGURATIONS Release) endif()