{"id":19602538,"url":"https://github.com/wang-bin/cmake-tools","last_synced_at":"2025-08-18T01:33:49.167Z","repository":{"id":141347882,"uuid":"83951370","full_name":"wang-bin/cmake-tools","owner":"wang-bin","description":"Cmake utilities for C++11 projects targeting Windows(host/cross build), Raspberry Pi (host/cross build), macOS, iOS, Android","archived":false,"fork":false,"pushed_at":"2025-07-23T09:43:37.000Z","size":447,"stargazers_count":41,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-23T11:36:40.802Z","etag":null,"topics":["android","clang","clang-cl","cmake","ios","lld","maccatalyst","macos","raspberry-pi","rpi","windows","winrt"],"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/wang-bin.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}},"created_at":"2017-03-05T06:55:57.000Z","updated_at":"2025-07-23T09:43:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4d506f7-5dea-4577-bb06-a53756f19d06","html_url":"https://github.com/wang-bin/cmake-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wang-bin/cmake-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wang-bin%2Fcmake-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wang-bin%2Fcmake-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wang-bin%2Fcmake-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wang-bin%2Fcmake-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wang-bin","download_url":"https://codeload.github.com/wang-bin/cmake-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wang-bin%2Fcmake-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270932567,"owners_count":24670240,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","clang","clang-cl","cmake","ios","lld","maccatalyst","macos","raspberry-pi","rpi","windows","winrt"],"created_at":"2024-11-11T09:24:47.146Z","updated_at":"2025-08-18T01:33:49.150Z","avatar_url":"https://github.com/wang-bin.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Windows Cross Build via Clang-CL + LLD\n\ntoolchain file: windows.clang.cmake\n\nMSVC ABI compatible. Supports x86, x64, arm64(clang-8+).\n\n#### Requirements\n- Copy of Windows SDK, only Include and Lib are used\n- Copy of msvc sdk, only include and lib are used\n\n#### Options\n- WINSDK_DIR (or environment var WindowsSdkDir): win10 sdk dir containing Include and Lib\n- WINSDK_VER (or environment var WindowsSDKVersion): win10 sdk version\n- MSVC_DIR (or environment var VCDIR): msvc dir containing include and lib\n- UWP: build for uwp\n- PHONE: build for windows phone\n- ONECORE: use onecore\n- USE_LIBCXX: use libc++ instead of msvcp\n\n#### Defined CMake Vars\n- WINRT: true if UWP or PHONE is set\n- WINSTORE: same as WINRT\n- WINDOWS_DESKTOP: not WINRT\n- WINDOWS_XP: if CMAKE_SYSTEM_VERSION \u003c 6.0\n\n#### Defined C/C++ Macros\n- _WIN32_WINNT\n\n## Generic Linux Clang+LLD Toolchain\n\ntoolchain file: linux.clang.cmake\n\nClang(set by CMAKE_C_COMPILER or auto detect) and LLVM tools are auto detected and highest version is selected.\n\n#### Options\n\nAlso applies for raspberry pi, sunxi etc.\n- USE_LIBCXX: use libc++ instead of libstdc++\n- USE_CXXABI: can be c++abi, stdc++ and supc++. Only required if libc++ is built with none abi\n- USE_COMPILER_RT: use compiler-rt instead of libgcc as compiler runtime library\n- USE_STDCXX: libstdc++ version to use, MUST be \u003e= 4.8. default is 0, selected by compiler\n- LINUX_SYSROOT: sysroot dir\n\n## Legacy Raspberry Pi Host/Cross Build via Clang + LLD\n\ntoolchain file: rpi.clang.cmake\n\nNOTE: using linux.clang.cmake and a generic linux sysroot is enough for a modern arm64 rpi OS. Legacy rpi(1~3) includes brcm libraries.\n\n#### Requirements\n- [Sysroot](https://sourceforge.net/projects/avbuild/files/raspberry-pi/rpi-sysroot.tar.xz/download)\n\n#### Options\n- USE_LIBCXX (optional, default off): use libc++ instead of libstdc++\n\n#### Defined CMake Vars\n- CMAKE_SYSTEM_PROCESSOR: armv6\n- RPI: 1\n- OS: rpi\n- CMAKE_CROSSCOMPILING: auto detected\n\n#### Defined C/C++ Macros\n- OS_RPI\n\n## iOS\n\ntoolchain file: ios.cmake (https://github.com/wang-bin/ios.cmake)\n\n#### Options\n- IOS_ARCH: can be armv7, arm64, i386, x86_64 and any combination of above, e.g. \"arm64;x86_64\" to build universal 64bit binaries\n- IOS_BITCODE (optional, default off)\n- IOS_EMBEDDED_FRAMEWORK (optional, default off)\n- IOS_DEPLOYMENT_TARGET (optional)\n\n\n## Additional Tools\n`include(tools.cmake)` after `project(...)`\n\n#### Features\n- Dead code elimination\n- ELF hardened (through option `ELF_HARDENED`, default is on)\n- ELF separated debug symbol\n- Windows XP support for VC (through option `WINDOWS_XP`, default is on)\n- Android system stdc++ dependency removal\n- LTO: USE_LTO=thin/0/1/N/AUTO, default is off\n- C++11 support for macOS 10.7\n- asan, ubsan\n- uninstall template\n\n#### Defined CMake Vars\n\n- ARCH: x86, x64, ${ANDROID_ABI}, empty for apple multi-arch build\n- WINRT, WINSTORE\n- OS=rpi, iOS, macOS, WinRT, android\n\n#### Functions\n- enable_ldflags_if\n- mkdsym: create elf debug symbol file\n- mkres: convert any binary to C/C++ byte array\n- set_relocatable_flags: enable relocatable object target\n- exclude_libs_all: forbid exporting symbols from static dependencies\n- set_rpath: rpath/runpath flags for ELF and Mach-O\n- target_sources: compatible implementation for cmake \u003c 3.1\n\n#### Defined C Macros\n- OS_RPI: if build for raspberry pi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwang-bin%2Fcmake-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwang-bin%2Fcmake-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwang-bin%2Fcmake-tools/lists"}