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

Getting a cmake error building, need a small fix to get it to work #221

Closed
n3rdopolis opened this issue Oct 26, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@n3rdopolis
Copy link

Hi
I seem to get this error with cmake,

CMake Error at /opt/share/LiriCMakeShared/modules/LiriAddQmlPlugin.cmake:70 (add_library):
  Target "LiriShellCompositorQmlPlugin" links to target
  "Liri::AuroraCompositor" but the target was not found.  Perhaps a
  find_package() call is missing for an IMPORTED target, or an ALIAS target
  is missing?
Call Stack (most recent call first):
  src/imports/compositor/CMakeLists.txt:5 (liri_add_qml_plugin)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

applying this gets it to work

diff --git a/src/imports/compositor/CMakeLists.txt b/src/imports/compositor/CMakeLists.txt
index a5fbabc7..03b8fcd5 100644
--- a/src/imports/compositor/CMakeLists.txt
+++ b/src/imports/compositor/CMakeLists.txt
@@ -2,6 +2,10 @@
 #
 # SPDX-License-Identifier: BSD-3-Clause
 
+if(NOT TARGET Liri::AuroraCompositor)
+    find_package(Liri1AuroraCompositor REQUIRED)
+endif()
+
 liri_add_qml_plugin(LiriShellCompositorQmlPlugin
     MODULE_PATH
         "Liri/Shell/Compositor"
@plfiorini plfiorini self-assigned this Oct 27, 2022
@plfiorini plfiorini added the bug Something isn't working label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants