How to list multiple slint files inside CMake? #8696
-
Hey! I'm trying to build something in C++ with Slint, and, I want to separate my components in multiple Currently, I've declared a variable in my CMake script to store a list of all set(SLINT_UI_LIST ${SLINT_UI_LIST}
./src/gui/slint/welcome_ui.slint
./src/gui/slint/library_ui.slint
)
# Many lines etc.
slint_target_sources(caju ${SLINT_UI_LIST}) However, I'm currently getting an error in the
This error occurs everytime that the list of So, I'm probably doing something wrong in my CMake script. So, my question is which is the correct way to declare multiple |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Looks like a bug. This should work
(tested there : https://github.com/slint-ui/slint/blob/master/api/cpp/tests/multiple-includes/CMakeLists.txt) But I'm afraid the |
Beta Was this translation helpful? Give feedback.
-
I did try to list one file per |
Beta Was this translation helpful? Give feedback.
Looks like a bug.
This should work
(tested there : https://github.com/slint-ui/slint/blob/master/api/cpp/tests/multiple-includes/CMakeLists.txt)
But I'm afraid the
slint_target_sources
is badly named and should have been namedslint_target_source
maybe. Because if you put things in the same namespace, you'll get symbols conflicts.