Warning, /utilities/mangonel/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 2.8.12) 0002 0003 project(Mangonel) 0004 0005 find_package (ECM REQUIRED NO_MODULE) 0006 set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 0007 0008 include (KDEInstallDirs) 0009 include (ECMInstallIcons) 0010 include (FeatureSummary) 0011 0012 find_package (Qt5 CONFIG REQUIRED Core Widgets Quick) 0013 0014 find_package (KF5 0015 REQUIRED COMPONENTS 0016 I18n 0017 NotifyConfig 0018 Notifications 0019 DBusAddons 0020 UnitConversion 0021 Service 0022 OPTIONAL_COMPONENTS 0023 GlobalAccel 0024 0025 ) 0026 set(EXTRA_LIBRARIES) 0027 0028 if (KF5GlobalAccel_FOUND) 0029 set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} KF5::GlobalAccel) 0030 add_definitions(-DKGLOBALACCEL_FOUND) 0031 endif() 0032 0033 set(Mangonel_SRCS 0034 Mangonel.cpp 0035 Config.cpp 0036 main.cpp 0037 Provider.cpp 0038 IconProvider.cpp 0039 providers/Applications.cpp 0040 providers/Paths.cpp 0041 providers/Shell.cpp 0042 providers/Calculator.cpp 0043 providers/Units.cpp 0044 0045 providers/calculator/constants.cpp 0046 providers/calculator/constants.h 0047 providers/calculator/evaluator.cpp 0048 providers/calculator/functions.cpp 0049 providers/calculator/numberformatter.cpp 0050 providers/calculator/opcode.cpp 0051 providers/calculator/settings.cpp 0052 0053 providers/calculator/floatcommon.c 0054 providers/calculator/floatconst.c 0055 providers/calculator/floatconvert.c 0056 providers/calculator/floaterf.c 0057 providers/calculator/floatexp.c 0058 providers/calculator/floatgamma.c 0059 providers/calculator/floathmath.c 0060 providers/calculator/floatincgamma.c 0061 providers/calculator/floatio.c 0062 providers/calculator/floatipower.c 0063 providers/calculator/floatlog.c 0064 providers/calculator/floatlogic.c 0065 providers/calculator/floatlong.c 0066 providers/calculator/floatnum.c 0067 providers/calculator/floatpower.c 0068 providers/calculator/floatseries.c 0069 providers/calculator/floattrig.c 0070 providers/calculator/number.c 0071 providers/calculator/cmath.cpp 0072 providers/calculator/cnumberparser.cpp 0073 providers/calculator/hmath.cpp 0074 providers/calculator/quantity.cpp 0075 providers/calculator/rational.cpp 0076 providers/calculator/units.cpp 0077 0078 globalshortcut/qglobalshortcut.cpp 0079 ) 0080 0081 if(APPLE) 0082 set(Mangonel_SRCS ${Mangonel_SRCS} 0083 globalshortcut/qglobalshortcut_macx.cpp 0084 ) 0085 elseif(WIN32) 0086 set(Mangonel_SRCS ${Mangonel_SRCS} 0087 globalshortcut/qglobalshortcut_win.cpp 0088 ) 0089 else() # Just assume Linux 0090 set(Mangonel_SRCS ${Mangonel_SRCS} 0091 globalshortcut/qglobalshortcut_x11.cpp 0092 ) 0093 find_package(Qt5X11Extras REQUIRED) 0094 find_package(X11 REQUIRED) 0095 find_package(XCB REQUIRED) 0096 set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} Qt5::X11Extras X11::X11 XCB::XCB) 0097 endif() 0098 0099 #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wall") 0100 #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") 0101 0102 set(CMAKE_AUTOMOC On) 0103 qt5_add_resources(Mangonel_SRCS resources.qrc) 0104 0105 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) 0106 0107 add_executable(mangonel ${Mangonel_SRCS}) 0108 0109 target_link_libraries(mangonel 0110 ${EXTRA_LIBRARIES} 0111 Qt5::Core 0112 Qt5::Widgets 0113 Qt5::Quick 0114 KF5::I18n 0115 KF5::DBusAddons 0116 KF5::NotifyConfig 0117 KF5::Notifications 0118 KF5::UnitConversion 0119 KF5::Service 0120 ) 0121 0122 set(DO_CLANG_TIDY "clang-tidy" "-checks=*,-clang-analyzer-alpha.*,-modernize-use-auto,-fuchsia-default-arguments,-hicpp-use-auto") 0123 0124 #set_target_properties(mangonel PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}") 0125 0126 install(TARGETS mangonel ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 0127 install(FILES mangonel.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR}) 0128 install(PROGRAMS mangonel.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR}) 0129 0130 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)