<commit_before>cmake_minimum_required(VERSION 2.6)

# optionally use libmenu-cache from lxde to generate the application menu
find_package(PkgConfig)
pkg_check_modules(MENU_CACHE
    libmenu-cache>=0.3.3
)

set(PLUGIN "mainmenu")


set(HEADERS
    lxqtmainmenu.h
    menustyle.h
    lxqtmainmenuconfiguration.h
)

set(SOURCES
    lxqtmainmenu.cpp
    menustyle.cpp
    lxqtmainmenuconfiguration.cpp
)

set(MOCS
    lxqtmainmenu.h
    menustyle.h
    lxqtmainmenuconfiguration.h
)

set(UIS
    lxqtmainmenuconfiguration.ui
)

# if libmenu-cache is available
if (MENU_CACHE_FOUND)
  list(APPEND SOURCES xdgcachedmenu.cpp)
  list(APPEND MOCS xdgcachedmenu.h)
  
  include_directories(${MENU_CACHE_INCLUDE_DIRS})
  add_definitions(-DHAVE_MENU_CACHE=1)

endif (MENU_CACHE_FOUND)

set(LIBRARIES
  ${LXQT_LIBRARIES}
  ${QTXDG_LIBRARIES}
  ${LXQT_GLOBALKEYS_LIBRARIES}
  ${LXQT_GLOBALKEYS_UI_LIBRARIES}
  ${MENU_CACHE_LIBRARIES}
)

set(QT_USE_QTXML 1)
set(QT_USE_QTDBUS 1)

#*******************************************
include ("../BuildPlugin.cmake")
BUILD_LXQT_PLUGIN(${PLUGIN})
<commit_msg>cmake option to build without menu-cache even if it is installed<commit_after>cmake_minimum_required(VERSION 2.6)

# optionally use libmenu-cache from lxde to generate the application menu
find_package(PkgConfig)
if (NOT WITHOUT_MENU_CACHE)
  pkg_check_modules(MENU_CACHE
    libmenu-cache>=0.3.3
  )
endif (NOT WITHOUT_MENU_CACHE)

set(PLUGIN "mainmenu")


set(HEADERS
    lxqtmainmenu.h
    menustyle.h
    lxqtmainmenuconfiguration.h
)

set(SOURCES
    lxqtmainmenu.cpp
    menustyle.cpp
    lxqtmainmenuconfiguration.cpp
)

set(MOCS
    lxqtmainmenu.h
    menustyle.h
    lxqtmainmenuconfiguration.h
)

set(UIS
    lxqtmainmenuconfiguration.ui
)

# if libmenu-cache is available
if (MENU_CACHE_FOUND)
  list(APPEND SOURCES xdgcachedmenu.cpp)
  list(APPEND MOCS xdgcachedmenu.h)
  
  include_directories(${MENU_CACHE_INCLUDE_DIRS})
  add_definitions(-DHAVE_MENU_CACHE=1)

endif (MENU_CACHE_FOUND)

set(LIBRARIES
  ${LXQT_LIBRARIES}
  ${QTXDG_LIBRARIES}
  ${LXQT_GLOBALKEYS_LIBRARIES}
  ${LXQT_GLOBALKEYS_UI_LIBRARIES}
  ${MENU_CACHE_LIBRARIES}
)

set(QT_USE_QTXML 1)
set(QT_USE_QTDBUS 1)

#*******************************************
include ("../BuildPlugin.cmake")
BUILD_LXQT_PLUGIN(${PLUGIN})

{'fraction_non_alphanumeric': 0.12302977232924693, 'fraction_numerical': 0.0070052539404553416, 'mean_word_length': 5.347222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7196350', 'n_tokens_mistral': 985, 'n_tokens_neox': 907, 'n_words': 136}