Warning, /education/kig/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 
0002 cmake_minimum_required(VERSION 3.16)
0003 
0004 # KDE Application Version, managed by release script
0005 set(RELEASE_SERVICE_VERSION_MAJOR "22")
0006 set(RELEASE_SERVICE_VERSION_MINOR "11")
0007 set(RELEASE_SERVICE_VERSION_MICRO "70")
0008 set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0009 
0010 project(kig VERSION ${RELEASE_SERVICE_VERSION})
0011 
0012 
0013 set (KDE5_ICON_DIR  ${CMAKE_INSTALL_PREFIX}/share/icons)
0014 
0015 find_package(ECM REQUIRED NO_MODULE)
0016 set(CMAKE_MODULE_PATH ${kig_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
0017 
0018 include(ECMAddAppIcon)
0019 include(ECMInstallIcons)
0020 include(ECMAddTests)
0021 include(KDEInstallDirs)
0022 include(KDECompilerSettings NO_POLICY_SCOPE)
0023 include(KDECMakeSettings)
0024 include(FeatureSummary)
0025 include(GenerateExportHeader)
0026 include(ECMSetupVersion)
0027 include(KDEGitCommitHooks)
0028 include(KDEClangFormat)
0029 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
0030 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0031 
0032 set(QT_MIN_VERSION "5.15.0")
0033 set(KF5_MIN_VERSION "5.90.0")
0034 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0035 
0036 find_package(KF5Parts ${KF5_MIN_VERSION} REQUIRED)
0037 find_package(KF5DocTools ${KF5_MIN_VERSION} REQUIRED)
0038 find_package(KF5I18n ${KF5_MIN_VERSION} REQUIRED)
0039 find_package(KF5TextEditor ${KF5_MIN_VERSION} REQUIRED)
0040 find_package(KF5IconThemes ${KF5_MIN_VERSION} REQUIRED)
0041 find_package(KF5ConfigWidgets ${KF5_MIN_VERSION} REQUIRED)
0042 find_package(KF5Archive ${KF5_MIN_VERSION} REQUIRED)
0043 find_package(KF5XmlGui ${KF5_MIN_VERSION} REQUIRED)
0044 find_package(KF5Crash ${KF5_MIN_VERSION} REQUIRED)
0045 find_package(KF5CoreAddons ${KF5_MIN_VERSION} REQUIRED)
0046 find_package(Qt${QT_MAJOR_VERSION}Svg ${QT_REQUIRED_VERSION} REQUIRED)
0047 find_package(Qt${QT_MAJOR_VERSION}PrintSupport ${QT_REQUIRED_VERSION}REQUIRED)
0048 find_package(Qt${QT_MAJOR_VERSION}XmlPatterns ${QT_REQUIRED_VERSION})
0049 
0050 
0051 ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KIG VERSION_HEADER kig_version.h)
0052 
0053 add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
0054 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
0055 
0056 
0057 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
0058   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
0059 endif()
0060 
0061 include(KigConfigureChecks.cmake)
0062 
0063 find_package(BoostPython)
0064 
0065 add_subdirectory( doc )
0066 add_subdirectory( icons )
0067 add_subdirectory( kig )
0068 add_subdirectory( mimetypes )
0069 add_subdirectory( macros )
0070 add_subdirectory( data )
0071 add_subdirectory( pykig )
0072 
0073 if(BoostPython_FOUND)
0074   add_subdirectory( scripting )
0075   add_definitions(-DKIG_ENABLE_PYTHON_SCRIPTING)
0076 endif(BoostPython_FOUND)
0077 
0078 set_package_properties(
0079    BoostPython PROPERTIES
0080    DESCRIPTION "Python scripting support in Boost"
0081    URL "https://www.boost.org/"
0082    TYPE OPTIONAL
0083    PURPOSE "Kig can optionally use Boost.Python for Python scripting"
0084 )
0085 
0086 set_package_properties(
0087    Qt${QT_MAJOR_VERSION}XmlPatterns PROPERTIES
0088    DESCRIPTION "Qt${QT_MAJOR_VERSION} XmlPatterns Module"
0089    URL "https://qt.io/"
0090    TYPE OPTIONAL
0091    PURPOSE "Kig uses the XML Patterns module in Qt to support Geogebra files"
0092 )
0093 
0094 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0095 
0096 include_directories( ${CMAKE_SOURCE_DIR}/modes )
0097 if(BoostPython_FOUND)
0098   include_directories(${BoostPython_INCLUDE_DIRS})
0099 endif(BoostPython_FOUND)
0100 
0101 # kigpart
0102 
0103 set(kigpart_PART_SRCS
0104    objects/angle_type.cc
0105    objects/arc_type.cc
0106    objects/base_type.cc
0107    objects/bogus_imp.cc
0108    objects/centerofcurvature_type.cc
0109    objects/circle_imp.cc
0110    objects/circle_type.cc
0111    objects/common.cc
0112    objects/conic_imp.cc
0113    objects/conic_types.cc
0114    objects/cubic_imp.cc
0115    objects/cubic_type.cc
0116    objects/curve_imp.cc
0117    objects/intersection_types.cc
0118    objects/inversion_type.cc
0119    objects/line_imp.cc
0120    objects/line_type.cc
0121    objects/locus_imp.cc
0122    objects/object_calcer.cc
0123    objects/object_drawer.cc
0124    objects/object_factory.cc
0125    objects/object_holder.cc
0126    objects/object_imp.cc
0127    objects/object_imp_factory.cc
0128    objects/object_type.cc
0129    objects/object_type_factory.cc
0130    objects/other_imp.cc
0131    objects/other_type.cc
0132    objects/point_imp.cc
0133    objects/point_type.cc
0134    objects/polygon_imp.cc
0135    objects/polygon_type.cc
0136    objects/bezier_imp.cc
0137    objects/bezier_type.cc
0138    objects/special_imptypes.cc
0139    objects/tangent_type.cc
0140    objects/tests_type.cc
0141    objects/text_imp.cc
0142    objects/text_type.cc
0143    objects/transform_types.cc
0144    objects/vector_type.cc
0145    misc/argsparser.cpp
0146    misc/builtin_stuff.cc
0147    misc/calcpaths.cc
0148    misc/common.cpp
0149    misc/conic-common.cpp
0150    misc/coordinate.cpp
0151    misc/coordinate_system.cpp
0152    misc/cubic-common.cc
0153    misc/equationstring.cc
0154    misc/goniometry.cc
0155    misc/guiaction.cc
0156    misc/kigcoordinateprecisiondialog.cpp
0157    misc/kigfiledialog.cc
0158    misc/kiginputdialog.cc
0159    misc/kignumerics.cpp
0160    misc/kigpainter.cpp
0161    misc/kigtransform.cpp
0162    misc/lists.cc
0163    misc/object_constructor.cc
0164    misc/object_hierarchy.cc
0165    misc/rect.cc
0166    misc/screeninfo.cc
0167    misc/special_constructors.cc
0168    misc/unit.cc
0169    modes/base_mode.cc
0170    modes/construct_mode.cc
0171    modes/dragrectmode.cc
0172    modes/edittype.cc
0173    modes/historydialog.cc
0174    modes/label.cc
0175    modes/linkslabel.cpp
0176    modes/macro.cc
0177    modes/macrowizard.cc
0178    modes/mode.cc
0179    modes/moving.cc
0180    modes/normal.cc
0181    modes/popup/popup.cc
0182    modes/popup/objectchooserpopup.cc
0183    modes/popup/propertiesactionsprovider.cc
0184    modes/popup/objectchooserpopup.cc
0185    modes/popup/objecttypeactionsprovider.cc
0186    modes/popup/nameobjectactionsprovider.cc
0187    modes/popup/objectconstructoractionsprovider.cc
0188    modes/popup/builtindocumentactionsprovider.cc
0189    modes/popup/builtinobjectactionsprovider.cc
0190    modes/textlabelwizard.cc
0191    modes/typesdialog.cpp
0192    filters/asyexporter.cc
0193    filters/asyexporteroptions.cc
0194    filters/asyexporterimpvisitor.cc
0195    filters/cabri-filter.cc
0196    filters/cabri-utils.cc
0197    filters/drgeo-filter.cc
0198    filters/exporter.cc
0199    filters/filter.cc
0200    filters/filters-common.cc
0201    filters/imageexporteroptions.cc
0202    filters/kgeo-filter.cc
0203    filters/kseg-filter.cc
0204    filters/latexexporter.cc
0205    filters/latexexporteroptions.cc
0206    filters/native-filter.cc
0207    filters/pgfexporterimpvisitor.cc
0208    filters/svgexporter.cc
0209    filters/svgexporteroptions.cc
0210    filters/xfigexporter.cc
0211    kig/kig_commands.cpp
0212    kig/kig_document.cc
0213    kig/kig_part.cpp
0214    kig/kig_view.cpp
0215 
0216 
0217    objects/angle_type.h
0218    objects/arc_type.h
0219    objects/base_type.h
0220    objects/bogus_imp.h
0221    objects/centerofcurvature_type.h
0222    objects/circle_imp.h
0223    objects/circle_type.h
0224    objects/common.h
0225    objects/conic_imp.h
0226    objects/conic_types.h
0227    objects/cubic_imp.h
0228    objects/cubic_type.h
0229    objects/curve_imp.h
0230    objects/intersection_types.h
0231    objects/inversion_type.h
0232    objects/line_imp.h
0233    objects/line_type.h
0234    objects/locus_imp.h
0235    objects/object_calcer.h
0236    objects/object_drawer.h
0237    objects/object_factory.h
0238    objects/object_holder.h
0239    objects/object_imp.h
0240    objects/object_imp_factory.h
0241    objects/object_type.h
0242    objects/object_type_factory.h
0243    objects/other_imp.h
0244    objects/other_type.h
0245    objects/point_imp.h
0246    objects/point_type.h
0247    objects/polygon_imp.h
0248    objects/polygon_type.h
0249    objects/bezier_imp.h
0250    objects/bezier_type.h
0251    objects/special_imptypes.h
0252    objects/tangent_type.h
0253    objects/tests_type.h
0254    objects/text_imp.h
0255    objects/text_type.h
0256    objects/transform_types.h
0257    objects/vector_type.h
0258    misc/argsparser.h
0259    misc/builtin_stuff.h
0260    misc/calcpaths.h
0261    misc/common.h
0262    misc/conic-common.h
0263    misc/coordinate.h
0264    misc/coordinate_system.h
0265    misc/cubic-common.h
0266    misc/equationstring.h
0267    misc/goniometry.h
0268    misc/guiaction.h
0269    misc/kigcoordinateprecisiondialog.h
0270    misc/kigfiledialog.h
0271    misc/kiginputdialog.h
0272    misc/kignumerics.h
0273    misc/kigpainter.h
0274    misc/kigtransform.h
0275    misc/lists.h
0276    misc/object_constructor.h
0277    misc/object_hierarchy.h
0278    misc/rect.h
0279    misc/screeninfo.h
0280    misc/special_constructors.h
0281    misc/unit.h
0282    modes/base_mode.h
0283    modes/construct_mode.h
0284    modes/dragrectmode.h
0285    modes/edittype.h
0286    modes/historydialog.h
0287    modes/label.h
0288    modes/linkslabel.h
0289    modes/macro.h
0290    modes/macrowizard.h
0291    modes/mode.h
0292    modes/moving.h
0293    modes/normal.h
0294    modes/popup/popup.h
0295    modes/popup/objectchooserpopup.h
0296    modes/popup/propertiesactionsprovider.h
0297    modes/popup/objectchooserpopup.h
0298    modes/popup/objecttypeactionsprovider.h
0299    modes/popup/nameobjectactionsprovider.h
0300    modes/popup/objectconstructoractionsprovider.h
0301    modes/popup/builtindocumentactionsprovider.h
0302    modes/popup/builtinobjectactionsprovider.h
0303    modes/textlabelwizard.h
0304    modes/typesdialog.h
0305    filters/asyexporter.h
0306    filters/asyexporteroptions.h
0307    filters/asyexporterimpvisitor.h
0308    filters/cabri-filter.h
0309    filters/cabri-utils.h
0310    filters/drgeo-filter.h
0311    filters/exporter.h
0312    filters/filter.h
0313    filters/filters-common.h
0314    filters/imageexporteroptions.h
0315    filters/kgeo-filter.h
0316    filters/kseg-filter.h
0317    filters/latexexporter.h
0318    filters/latexexporteroptions.h
0319    filters/native-filter.h
0320    filters/pgfexporterimpvisitor.h
0321    filters/svgexporter.h
0322    filters/svgexporteroptions.h
0323    filters/xfigexporter.h
0324    kig/kig_commands.h
0325    kig/kig_document.h
0326    kig/kig_part.h
0327    kig/kig_view.h
0328 )
0329 
0330 if (Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND)
0331   set(kigpart_PART_SRCS ${kigpart_PART_SRCS}
0332   geogebra/geogebratransformer.cpp
0333   geogebra/geogebrasection.cpp
0334   filters/geogebra-filter.cpp)
0335   qt_add_resources(kigpart_PART_SRCS ${CMAKE_SOURCE_DIR}/geogebra/geogebra.qrc)
0336   add_definitions(-DWITH_GEOGEBRA=1)
0337 endif()
0338 
0339 ki18n_wrap_ui(kigpart_PART_SRCS
0340    modes/typeswidget.ui
0341    modes/edittypewidget.ui
0342    modes/historywidget.ui
0343    filters/asyexporteroptionswidget.ui
0344    filters/imageexporteroptionswidget.ui
0345    filters/latexexporteroptionswidget.ui
0346    filters/svgexporteroptionswidget.ui
0347    misc/kigcoordinateprecisiondialog.ui
0348 )
0349 
0350 if(BoostPython_FOUND)
0351   set(kigpart_PART_SRCS ${kigpart_PART_SRCS}
0352      modes/popup/scriptactionsprovider.cc
0353      scripting/newscriptwizard.cc
0354      scripting/python_scripter.cc
0355      scripting/python_type.cc
0356      scripting/script-common.cc
0357      scripting/script_mode.cc
0358   )
0359 
0360   kde_source_files_enable_exceptions(scripting/python_scripter.cc)
0361 endif(BoostPython_FOUND)
0362 
0363 
0364 add_library(kigpart MODULE ${kigpart_PART_SRCS})
0365 generate_export_header(kigpart)
0366 
0367 kcoreaddons_desktop_to_json(kigpart kig/kig_part.desktop)
0368 
0369 target_link_libraries(kigpart
0370   Qt::Gui
0371   Qt::Svg
0372   Qt::PrintSupport
0373   KF5::Crash
0374   KF5::Parts
0375   KF5::I18n
0376   KF5::TextEditor
0377   KF5::IconThemes
0378   KF5::ConfigWidgets
0379   KF5::Archive
0380 )
0381 
0382 if(BoostPython_FOUND)
0383   target_link_libraries(kigpart ${BoostPython_LIBRARIES} ${KDE5_KTEXTEDITOR_LIBS})
0384 endif(BoostPython_FOUND)
0385 
0386 if (Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND)
0387   target_link_libraries(kigpart Qt::XmlPatterns)
0388 endif(Qt${QT_MAJOR_VERSION}XmlPatterns_FOUND)
0389 
0390 ki18n_install(po)
0391 if (KF5DocTools_FOUND)
0392     kdoctools_install(po)
0393 endif()
0394 install(TARGETS kigpart DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/parts)
0395 install(FILES org.kde.kig.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0396 
0397 # unit tests
0398 if (BUILD_TESTING)
0399   add_subdirectory(tests)
0400 endif ()
0401 
0402 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)