Skip to content
Snippets Groups Projects
CMakeLists.txt 1010 B
cmake_minimum_required(VERSION 3.16)
project(cumbia-copy-source-context-menu-actions VERSION 1.0 LANGUAGES C CXX)

find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui DBus)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS UiPlugin)

qt_standard_project_setup()

# in order to find quapps-pre-target and quapps-post-target (below)
# make sure you specify -DCMAKE_MODULE_PATH=/usr/local/cumbia-libs/lib/cmake
# alongside the cmake command
#
# find available cumbia modules and enable them
include(quapps-pre-target)

file(GLOB_RECURSE SOURCES src/*.cpp)
file(GLOB_RECURSE HEADERS src/*.h)

qt_add_plugin(${PROJECT_NAME} SHARED
     ${SOURCES} ${HEADERS} src/${PROJECT_NAME}.json)

target_include_directories(${PROJECT_NAME} PRIVATE
    src
)

# finalize inclusion of available cumbia modules
include(quapps-post-target) # needs -DCMAKE_MODULE_PATH=

install(TARGETS ${PROJECT_NAME}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/qumbia-plugins
)