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

rlottie: Switch to CMake #280135

Merged
merged 1 commit into from
Jan 30, 2024
Merged

rlottie: Switch to CMake #280135

merged 1 commit into from
Jan 30, 2024

Conversation

OPNA2608
Copy link
Contributor

Description of changes

I've encountered a project which tries to use rlottie's CMake module, which appears to be missing:

CMake Error at CMakeLists.txt:22 (find_package):
  By not providing "Findrlottie.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "rlottie", but
  CMake did not find one.

  Could not find a package configuration file provided by "rlottie" with any
  of the following names:

    rlottieConfig.cmake
    rlottie-config.cmake

  Add the installation prefix of "rlottie" to CMAKE_PREFIX_PATH or set
  "rlottie_DIR" to a directory containing one of the above files.  If
  "rlottie" provides a separate development package or SDK, be sure it has
  been installed.

The meson script has code for generating parts of the module, but it seems to be missing code for generating the targets file the config is expecting.

CMake Error at /nix/store/jh2j6l7yfmz1yqbvkdkj4b0rhq789gr4-rlottie-0.2/lib/cmake/rlottie/rlottieConfig.cmake:13 (include):
  include could not find requested file:

    /nix/store/jh2j6l7yfmz1yqbvkdkj4b0rhq789gr4-rlottie-0.2/lib/cmake/rlottie/rlottieTargets.cmake
↪ ll /nix/store/jh2j6l7yfmz1yqbvkdkj4b0rhq789gr4-rlottie-0.2/lib/cmake/rlottie/
insgesamt 8,0K
dr-xr-xr-x 2 root root   67  1. Jan 1970  .
dr-xr-xr-x 3 root root   21  1. Jan 1970  ..
-r--r--r-- 1 root root  546  1. Jan 1970  rlottieConfig.cmake
-r--r--r-- 1 root root 1,4K  1. Jan 1970  rlottieConfigVersion.cmake

The CMake config module only seems to be generated properly when using CMake. I lack the meson skills to know how one would solve this within the meson code, so I'd like to propose this switch to CMake.

Result works fine in some not-yet-upstreamed packages (rlottie-qml builds but has no binaries -> teleports uses it and works fine), nixpkgs-review rev HEAD passes & telegram-desktop at least launches fine.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

The CMake config module only seems to be generated when using CMake to build
@OPNA2608
Copy link
Contributor Author

To test some rlottie users on CI:

@ofborg build lottieconverter lottieconverter.passthru.tests telegram-desktop telegram-desktop.passthru.tests

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OPNA2608 OPNA2608 added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 29, 2024
@drupol drupol merged commit 335ba07 into NixOS:master Jan 30, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants