Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add cmake support #995

Closed
wants to merge 1 commit into from
Closed

build: add cmake support #995

wants to merge 1 commit into from

Conversation

ksqsf
Copy link
Member

@ksqsf ksqsf commented Nov 10, 2024

Add support for building with CMake. See INSTALL.md for usage.

Demo build:

make -Clibrime deps
bash librime/install-plugins.sh hchunhui/librime-lua lotem/librime-octagram rime/librime-predict
cmake -S. -GNinja -Bbuild -DSIGN_KEY='localrun'
ninja -Cbuild install

The xcode build system is preserved, and I do not expect cmake to be the official build system due to the lack of universal binaries.

Some advantages:

  1. Simple: everything (except librime deps and plugins) is now packed into the cmake scripts and there's no need to call different make targets and scripts. Even a novice can build squirrel in minutes.
  2. Performance: CMake+Ninja is tremendously faster than xcodebuild.
  3. Don't need much maintenance: the xcode build system requires hard-coding file list, but cmake can automatically find them. We don't need to pay much attention to cmake once it's there.
  4. ninja install Just Works™: squirrel won't disappear from the IME list.

@ksqsf
Copy link
Member Author

ksqsf commented Dec 18, 2024

Building swift code with cmake still leaves much to be desired and I don't have the motivation to improve it.

Closing this in favor of a potentially better tool: meson or xmake.

@ksqsf ksqsf closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant