npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cmake-build

v0.0.6

Published

[![Build](https://github.com/eliasku/cmake-build/actions/workflows/build.yml/badge.svg)](https://github.com/eliasku/cmake-build/actions/workflows/build.yml) [![Version](https://img.shields.io/npm/v/cmake-build)](https://www.npmjs.com/package/cmake-build)

Downloads

32

Readme

cmake-build

Build Version Downloads

Utility for configuring and building CMake projects with NPM packages support. Basic cross-compile features are provided (building for another system from a host system).

CMake NPM packages

Link CMake projects installed from NPM packages

include(npm.cmake)
  • Add cmake-build to your package.json in dependencies section (not devDependencies because we want to resolve dependencies after install automatically)
  • Add include(npm.cmake) to the beginning of your CMakeLists.txt
  • Run npx cmake-build to generate configuration module npm.cmake with resolved NPM dependencies

Package name convention

  • Scoped NPM package name @scope/package-name transforms to CMake target scope::package-name
  • Packages without scope is not transform

Cross-compile

Status

  • [x] MacOS
    • [x] Android
    • [x] WebAssembly
    • [x] iOS
    • [x] macOS
    • [x] Windows (Mingw)
    • [x] Linux (Docker)
  • [ ] Windows
  • [ ] Linux

Requirements

macOS

Install Mingw for building Windows platform.

brew install mingw-w64

Install docker and follow guides how to build from images.

IDE

It's very hard to fix platform-side code inside generated projects (XCode, Android Studio), so we able to switch platform inside your cmake-compatible IDE (like CLion).

  1. Create Debug-Emscripten
  2. Set the path to CMake Emscripten Toolchain
# Emscripten
-DCMAKE_TOOLCHAIN_FILE=/Users/PATH_TO_emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake

# iOS (https://github.com/leetal/ios-cmake/blob/master/ios.toolchain.cmake)
-DPLATFORM=SIMULATOR64 -DCMAKE_TOOLCHAIN_FILE=./cmake/ios.cmake

# Android
-DANDROID_ABI=x86_64 -DCMAKE_TOOLCHAIN_FILE=/Users/USER/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake

# Windows from MacOS
brew install mingw-w64
-DCMAKE_TOOLCHAIN_FILE=./cmake/mingw-w64-x86_64.cmake

Docker

Docker files for cross-platform building

# build docker image for linux build
cd images/linux
docker build -t eliasku/ubuntu:1.0 .

# run docker in your current project dir
cd your/project/path
docker run -it --mount type=bind,source=$(pwd),target=/mnt eliasku/ubuntu:1.0 /bin/sh -c "cd /mnt && bash"