{"id":22843374,"url":"https://github.com/milahu/qmake2cmake","last_synced_at":"2025-04-28T13:44:13.038Z","repository":{"id":38010715,"uuid":"502427168","full_name":"milahu/qmake2cmake","owner":"milahu","description":"Tool to convert qmake .pro files to CMakeLists.txt. mirror of https://code.qt.io/cgit/qt/qmake2cmake.git/","archived":false,"fork":false,"pushed_at":"2023-07-28T12:23:39.000Z","size":995,"stargazers_count":12,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-03-30T10:11:21.098Z","etag":null,"topics":["cmake","qmake","qt","qt5","qt6"],"latest_commit_sha":null,"homepage":"https://code.qt.io/cgit/qt/qmake2cmake.git/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milahu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.GPL3","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-11T18:31:49.000Z","updated_at":"2025-02-24T03:00:52.000Z","dependencies_parsed_at":"2022-07-12T00:01:59.124Z","dependency_job_id":null,"html_url":"https://github.com/milahu/qmake2cmake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fqmake2cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fqmake2cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fqmake2cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fqmake2cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milahu","download_url":"https://codeload.github.com/milahu/qmake2cmake/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251321544,"owners_count":21570757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","qmake","qt","qt5","qt6"],"created_at":"2024-12-13T02:14:32.140Z","updated_at":"2025-04-28T13:44:13.015Z","avatar_url":"https://github.com/milahu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qmake2cmake\n\nThis repository contains Python scripts to convert QMake projects to\nCMake projects.\n\n## Goals\n\nThe qmake2cmake tool creates a `CMakeLists.txt` that covers the most common\nattributes of the converted `.pro` file.  The generated CMake project can be\nused as baseline and will most likely need manual adjustments.\n\nQMake constructs that cannot be converted end up in the CMake project as\ncomment.\n\n## Non-goals\n\nThe following QMake constructs are not converted:\n- `TEMPLATE = aux` projects\n- custom `.prf` files\n- extra compilers\n- extra targets\n- installation rules\n\n# Requirements\n\n* [Python 3.7](https://www.python.org/downloads/),\n* `pip` to manage Python packages.\n\n# Installation\n\nYou can install the `qmake2cmake` package directly via `pip install\nqmake2cmake`.\n\nIn case you are developing a new feature or want to install the latest\nrepository version, do an editable build by running `pip install -e .`\n\n# Installation for contributors\n\nFor developers who want to contribute to `qmake2cmake`, we recommend\nusing a [virtual\nenvironment](https://docs.python.org/3/library/venv.html) to avoid\nconflicts with other packages that are already installed.\n\n* Create an environment: `python3 -m venv env --prompt qmake2cmake`,\n* Activate the environment: `source env/bin/activate`\n  (on Windows: `env\\Scripts\\activate.bat`)\n* Install the requirements: `pip install -r requirements.txt`\n\nIf the `pip install` command above doesn't work, try:\n\n```\npython3.7 -m pip install -r requirements.txt\n```\n\n# Usage\n\nAfter installing the `qmake2cmake` package, two scripts will be\navailable in your bin/ directory of your Python environment:\n`qmake2cmake` and `qmake2cmake_all`.\n\nThe following call converts a single QMake project file to CMake:\n```\nqmake2cmake ~/projects/myapp/myapp.pro --min-qt-version 6.3\n```\n\nIt's necessary to specify a minimum Qt version the project is supposed\nto be built with. Use the `--min-qt-version` option or the\nenvironment variable `QMAKE2CMAKE_MIN_QT_VERSION`.\n\nBy default, a `CMakeLists.txt` is placed next to the `.pro` file.\n\nTo generate `CMakeLists.txt` in a different location, use the `-o` option:\n```\nqmake2cmake ~/projects/myapp/myapp.pro --min-qt-version 6.3 -o ~/projects/myapp-converted/CMakeLists.txt\n```\n\nTo convert a whole project tree, pass the project directory to `qmake2cmake_all`:\n```\nqmake2cmake_all ~/projects/myapp --min-qt-version 6.3\n```\n\n# Contributing\n\nThe main source code repository is hosted at\n[codereview.qt-project.org](https://codereview.qt-project.org/q/project:qt/qmake2cmake).\n\nSee the [Qt Contribution Guidelines](https://wiki.qt.io/Qt_Contribution_Guidelines)\npage, [Setting up Gerrit](https://wiki.qt.io/Setting_up_Gerrit) and\n[Gerrit Introduction](https://wiki.qt.io/Gerrit_Introduction) for more\ndetails about how to upload patches for review.\n\n## Code style and tests\n\nYou can run the linter (`mypy`), code-style checkers (`flake8`, `black`)\nand tests (`pytest`) by executing:\n\n```\nmake test\n```\n\nThere are also separate make targets for each of those `make mypy`, `make flake8`,\n`make black_format_check`, `make pytest`.\n\nYou can auto-format the code using [black](https://black.readthedocs.io/en/stable/):\n\n```\nmake format\n```\n\n\n# Releasing a new version\n\nIncrease the version number in `setup.cfg` according to semantic versioning 2.0.\n\nFor building and uploading `qmake2cmake` you will need the Python\nmodules `build` and `twine`.\n\nBuild the wheel:\n```\n$ python -m build\n```\n\nUpload to testpypi:\n```\n$ twine upload --repository testpypi dist/\u003cwheel-name\u003e\n```\n\nInstall the uploaded wheel in a fresh venv:\n```\n$ python -m venv fresh \u0026\u0026 . ./fresh/bin/activate\n(fresh)$ pip install -i https://testpypi.python.org/pypi qmake2cmake --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple\n\n```\n\nIf the installation succeeded, try to convert something.\nIf everything is bueno, upload the wheel to production pypi.\n\n```\n$ twine upload --repository pypi dist/\u003cwheel-name\u003e\n```\n\nIt is advisable to try out this wheel in another fresh venv.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilahu%2Fqmake2cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilahu%2Fqmake2cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilahu%2Fqmake2cmake/lists"}