Warning, /games/kajongg/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # vim: set expandtab shiftwidth=4 softtabstop=4:
0002 cmake_minimum_required (VERSION 3.16)
0003 
0004 # Release Service version, managed by release script
0005 set(RELEASE_SERVICE_VERSION_MAJOR "24")
0006 set(RELEASE_SERVICE_VERSION_MINOR "04")
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(kajongg VERSION ${RELEASE_SERVICE_VERSION})
0011 
0012 set(PYTHON_MIN_VERSION "3.8.0")
0013 set(QT_MIN_VERSION "6.5.0")
0014 set(KF_MIN_VERSION "6.0.0")
0015 set(TWISTED_MIN_VERSION "16.6.0")
0016 
0017 find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
0018     
0019 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules ${ECM_MODULE_PATH})
0020 
0021 include(FeatureSummary)
0022 include(KDEInstallDirs)
0023 include(ECMInstallIcons)
0024 include(KDECMakeSettings)
0025 
0026 find_package(Python3 ${PYTHON_MIN_VERSION} COMPONENTS REQUIRED)
0027 
0028 include(KDEPython)
0029 
0030 find_package(Twisted ${TWISTED_MIN_VERSION} REQUIRED)
0031 find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS
0032     Core
0033     Gui
0034     Svg
0035     SvgWidgets
0036     Widgets
0037 )
0038 
0039 find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS
0040     DocTools
0041     I18n
0042 )
0043 
0044 add_subdirectory( voices )
0045 add_subdirectory( doc )
0046 add_subdirectory( icons )
0047 
0048 set(SRCFILES
0049     src/permutations.py
0050     src/animation.py
0051     src/mjresource.py
0052     src/background.py
0053     src/backgroundselector.py
0054     src/board.py
0055     src/chat.py
0056     src/handboard.py
0057     src/message.py
0058     src/client.py
0059     src/intelligence.py
0060     src/altint.py
0061     src/common.py
0062     src/wind.py
0063     src/rand.py
0064     src/config.py
0065     src/kdestub.py
0066     src/deferredutil.py
0067     src/differ.py
0068     src/meld.py
0069     src/player.py
0070     src/game.py
0071     src/games.py
0072     src/genericdelegates.py
0073     src/guiutil.py
0074     src/humanclient.py
0075     src/mi18n.py
0076     src/login.py
0077     src/kde.py
0078     src/dialogs.py
0079     src/mainwindow.py
0080     src/move.py
0081     src/modeltest.py
0082     src/playerlist.py
0083     src/predefined.py
0084     src/qtreactor.py
0085     src/query.py
0086     src/rulesetselector.py
0087     src/hand.py
0088     src/rule.py
0089     src/rulecode.py
0090     src/scene.py
0091     src/scoringdialog.py
0092     src/scoring.py
0093     src/user.py
0094     src/servertable.py
0095     src/servercommon.py
0096     src/server.py
0097     src/sound.py
0098     src/tables.py
0099     src/tile.py
0100     src/uitile.py
0101     src/tileset.py
0102     src/tilesetselector.py
0103     src/tree.py
0104     src/statesaver.py
0105     src/wall.py
0106     src/uiwall.py
0107     src/visible.py
0108     src/log.py
0109     src/qt.py
0110     src/configdialog.py
0111     src/tilesource.py
0112     src/util.py
0113     src/kajcsv.py)
0114 
0115 set(DATAFILES
0116     src/tilesetselector.ui
0117     src/backgroundselector.ui
0118     src/kajonggui.rc)
0119 
0120 
0121 find_package(KMahjongglib6 6.0.0 REQUIRED)
0122 
0123 # In KDE4, this was done with PYKDE4_INSTALL_PYTHON_FILES and PYKDE4_ADD_EXECUTABLE
0124 # because including PYKDE4 does not seem appropriate when not using PYKDE4 bindings,
0125 # I expanded those macros, reducing to what we actually need. No Windows support here yet.
0126 # Those macros come from ./cmake-modules/KDEPython.cmake
0127 
0128 # generating appversion.py 2x, once for toplevel setup ,once for app in src/ itself
0129 configure_file(src/appversion.py.in appversion.py)
0130 configure_file(src/appversion.py.in src/appversion.py)
0131 configure_file(src/kdepaths.py.in src/kdepaths.py)
0132 
0133 KDE_INSTALL_PYTHON_FILES(${SRCFILES} src/kajongg.py src/kajonggserver.py)
0134 KDE_INSTALL_PYTHON_FILES(${CMAKE_CURRENT_BINARY_DIR}/src/kdepaths.py)
0135 KDE_INSTALL_PYTHON_FILES(${CMAKE_CURRENT_BINARY_DIR}/src/appversion.py)
0136 KDE_ADD_PYTHON_EXECUTABLE(kajongg.py kajongg)
0137 KDE_ADD_PYTHON_EXECUTABLE(kajonggserver.py kajonggserver)
0138 
0139 install(FILES ${DATAFILES} DESTINATION ${KDE_INSTALL_DATADIR}/kajongg)
0140 
0141 install(FILES org.kde.kajongg.desktop DESTINATION ${KDE_INSTALL_APPDIR})
0142 install(FILES org.kde.kajongg.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0143 
0144 ki18n_install(po)
0145 kdoctools_install(po)
0146 
0147 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)