-
Notifications
You must be signed in to change notification settings - Fork 238
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
Should the current working dir be added automatically to search paths? #261
Comments
Sorry, I can't see a question there. Can you make the question more explicit? |
Ah... the question is in the title. Well, if you think you have a way to improve the cmake build, I'll welcome a PR. |
Sure. I’ll have a go at it. |
So I found a solution to using fetchContent without having to modify element's cmake files. It also allows the use of elements' bundled fonts and other resources, and allows specifying a resource dir for my test project. cmake_minimum_required(VERSION 3.15)
project(elements_example)
set(ELEMENTS_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
include(FetchContent)
FetchContent_Declare(elements GIT_REPOSITORY https://github.com/cycfi/elements)
FetchContent_MakeAvailable(elements)
set(ELEMENTS_ROOT ${elements_SOURCE_DIR})
set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${ELEMENTS_ROOT}/cmake")
set(ELEMENTS_APP_PROJECT "app")
set(ELEMENTS_APP_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/resources/ex.png)
include(ElementsConfigApp) |
Looks good. Perhaps the examples could make use of that as well. I'd welcome a PR. |
Using fetchContent in the examples dir seems out of place. I could add it to the setup docs, assuming it's under the qplug_api_changes branch. |
Hello
Thanks for working on elements.
This is more of a question than an issue.
I use CMake's fetch content to add elements as a dependency, cmake also fetches other git submodules automatically:
The problem is adding resources via ELEMENTS_APP_RESOURCES won't work in that setup, and
add_search_path(".");
feels like it should be implied.The text was updated successfully, but these errors were encountered: