{"id":39870282,"url":"https://github.com/stdware/qmsetup","last_synced_at":"2026-01-18T14:13:50.710Z","repository":{"id":194769064,"uuid":"691512961","full_name":"stdware/qmsetup","owner":"stdware","description":"CMake Modules and Basic Libraries for C/C++ projects.","archived":false,"fork":false,"pushed_at":"2026-01-16T13:48:31.000Z","size":474,"stargazers_count":64,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-17T04:13:03.727Z","etag":null,"topics":["cmake","cmake-modules","cmake-utils","cpp"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stdware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-14T10:30:18.000Z","updated_at":"2026-01-16T13:48:49.000Z","dependencies_parsed_at":"2023-09-23T15:02:16.372Z","dependency_job_id":"ff29ecc8-eef0-41b0-a9a1-ca06b3d383ba","html_url":"https://github.com/stdware/qmsetup","commit_stats":null,"previous_names":["sinestriker/qtmediate-cmake-utils","stdware/qmsetup"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stdware/qmsetup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdware%2Fqmsetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdware%2Fqmsetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdware%2Fqmsetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdware%2Fqmsetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stdware","download_url":"https://codeload.github.com/stdware/qmsetup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdware%2Fqmsetup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","cmake-modules","cmake-utils","cpp"],"created_at":"2026-01-18T14:13:49.990Z","updated_at":"2026-01-18T14:13:50.685Z","avatar_url":"https://github.com/stdware.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QMSetup\n\n**QMSetup** is a set of CMake Modules and Basic Libraries for C/C++ projects.\n\n**This project is independent from Qt and other 3rdparty libraries.** Due to the fact that it encompasses some tools that need to be compiled, it's strongly not suggested to be included as a subproject.\n\n## Features\n\n### Helpful Functions\n+ Path, Version functions\n+ Target configuration functions\n+ Qt related functions\n\n### Generators\n+ Generate Windows RC files, manifest files\n+ Generate MacOS Bundle info files\n+ Generate configuration header files\n+ Generate Git information header files\n\n### Filesystem Utilities\n+ Reorganize header files\n+ Copy files and directories after build\n\n### Install Utilities\n+ Deploy project dependencies and fix rpaths\n\n### Extended Build Rules\n+ Create translations with **Qt Linguist** tools\n+ Create source files with **Protobuf** compiler\n+ Create documentations with **Doxygen**\n\n## Support Platforms\n\n+ Microsoft Windows\n+ Apple Macintosh\n+ GNU/Linux\n\n## Dependencies\n\n### Required Packages\n\n#### Windows\n\nWindows deploy command acquires the shared library paths by reading the PE files and searching the specified paths so that it doesn't depend on `dumpbin` tool.\n\n#### Unix\n\nUnix deploy command acquires the shared library paths by running `ldd`/`otool` command and fixes the *rpath*s by runing the `patchelf`/`install_name_tool` command, make sure you have installed them.\n\n```sh\nsudo apt install patchelf\n```\n\n### Build System\n\n+ C++ 17\n+ CMake 3.19\n\n### Open-Source Libraries\n+ https://github.com/SineStriker/syscmdline\n+ https://github.com/jothepro/doxygen-awesome-css\n\n## Integrate\n\n### Clone\n\nVia Https\n```sh\ngit clone --recursive https://github.com/stdware/qmsetup.git\n```\nVia SSH\n```sh\ngit clone --recursive git@github.com:stdware/qmsetup.git\n```\n\n### Preinstall (Suggested)\n\n#### Build \u0026 Install\n```sh\ncmake -B build -DCMAKE_BUILD_TYPE=Release \\\n               -DCMAKE_INSTALL_PREFIX=/path/to\ncmake --build build --target all\ncmake --build build --target install\n```\n\n#### Import\n```sh\ncmake -Dqmsetup_DIR=/path/to/lib/cmake/qmsetup ...\n```\n```cmake\nfind_package(qmsetup REQUIRED)\n```\n\n### Sub-project\n\nIt still needs to be installed, but the installation occurs during the CMake Configure phase and is executed only once.\n\n```cmake\nfind_package(qmsetup QUIET)\n\nif (NOT TARGET qmsetup::library)\n    # Modify this variable according to your project structure\n    set(_source_dir ${CMAKE_CURRENT_SOURCE_DIR}/qmsetup)\n\n    # Import install function\n    include(\"${_source_dir}/cmake/modules/private/InstallPackage.cmake\")\n\n    # Install package in place\n    set(_package_path)\n    qm_install_package(qmsetup\n        SOURCE_DIR ${_source_dir}\n        BUILD_TYPE Release\n        RESULT_PATH _package_path\n    )\n\n    # Find package again\n    find_package(qmsetup REQUIRED PATHS ${_package_path})\n\n    # Update import path\n    set(qmsetup_DIR ${_package_path} CACHE PATH \"\" FORCE)\nendif()\n```\n\n## Quick Start\n\n### Examples\n\nYou can use the functions in this library to greatly simplify several kinds of common build rules.\n\n#### Generate Configuration Header\n```cmake\nqm_import(Preprocess)\n\nqm_add_definition(FOO false)\nqm_add_definition(BAR 114514)\nqm_add_definition(BAZ \"ABC\" STRING_LITERAL)\n\nqm_generate_config(${CMAKE_BINARY_DIR}/conf.h)\n```\n\n#### Reorganize Include Directory\n```cmake\nqm_import(Preprocess)\n\nqm_sync_include(src/core ${CMAKE_BINARY_DIR}/include/MyCore\n    INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/MyCore\n)\n```\n\n#### Sync Resource Files After Build\n```cmake\nqm_import(Filesystem)\n\nqm_add_copy_command(${PROJECT_NAME}\n    SOURCES\n        file.txt\n        dir_to_copy\n        dir_contents_to_copy/\n    DESTINATION .\n)\n```\n\n#### Deploy Project And All Dependencies\n```cmake\nqm_import(Deploy)\n\nqm_deploy_directory(\"${CMAKE_INSTALL_PREFIX}\"\n    COMMENT \"Deploy project spectacularly\"\n    PLUGINS \"iconengines/qsvgicon\" \"bearer/qgenericbearer\"\n    QML Qt QtQml\n    PLUGIN_DIR share/plugins\n    QML_DIR share/qml\n)\n```\n\n#### Add Qt Translations\n```cmake\nqm_import(Translate)\n\nqm_find_qt(LinguistTools)\nqm_add_translation(${PROJECT_NAME}_translations\n    LOCALES ja_JP zh_CN zh_TW\n    PREFIX ${PROJECT_NAME}\n    TARGETS ${PROJECT_NAME}\n    TS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/translations\n    QM_DIR ${CMAKE_CURRENT_BINARY_DIR}/translations\n)\n```\n\n#### Generate Protubuf Source Files\n```cmake\nqm_import(Protobuf)\n\nfind_package(Protobuf REQUIRED)\nqm_create_protobuf(_proto_src\n    INPUT a.proto b.proto\n    INCLUDE_DIRECTORIES src/proto\n    OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/proto\n)\ntarget_sources(${PROJECT_NAME} PUBLIC ${_proto_src})\n```\n\n#### Generate Doxygen HTML Documentations\n```cmake\nqm_import(Doxygen)\n\nfind_package(Doxygen REQUIRED)\nqm_setup_doxygen(${PROJECT_NAME}_RunDoxygen\n    NAME ${PROJECT_NAME}\n    DESCRIPTION \"my project\"\n    MDFILE \"${CMAKE_SOURCE_DIR}/README.md\"\n    OUTPUT_DIR \"${CMAK_BINARY_DIR}/doc\"\n    INPUT src\n    TARGETS ${PROJECT_NAME}\n    DEPENDS ${PROJECT_NAME}\n    NO_EXPAND_MACROS\n        Q_OBJECT\n        Q_GADGET\n        Q_DECLARE_TR_FUNCTIONS\n    COMPILE_DEFINITIONS \n        Q_SIGNALS=Q_SIGNALS\n        Q_SLOTS=Q_SLOTS\n    GENERATE_TAGFILE \"${PROJECT_NAME}_tagfile.xml\"\n    INSTALL_DIR \"doc\"\n)\n```\n\n### Find Modules\n\nUse `qm_find_package` to find supported third-party packages.\n\n+ YY-Thunks: https://github.com/Chuyu-Team/YY-Thunks\n+ VC-LTL5: https://github.com/Chuyu-Team/VC-LTL5\n\n### Detailed Documentations\n\n+ [Core Command](docs/core-command.md)\n\nThe CMake Modules documentations is provided in the comments.\n\nSee `examples` to get detailed use cases.\n\n## Contributors\n\n+ [SineStriker](https://github.com/SineStriker)\n+ [wangwenx190](https://github.com/wangwenx190)\n+ [RigoLigoRLC](https://github.com/RigoLigoRLC)\n+ [CrSjimo](https://github.com/CrSjimo)\n\n## License\n\nQMSetup is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdware%2Fqmsetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdware%2Fqmsetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdware%2Fqmsetup/lists"}