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

Library usage with CMake #1310

Closed
f-fanni opened this issue Dec 15, 2021 · 1 comment
Closed

Library usage with CMake #1310

f-fanni opened this issue Dec 15, 2021 · 1 comment

Comments

@f-fanni
Copy link

f-fanni commented Dec 15, 2021

Hi, trying to set up a project including this library with add_subdirectory(ext/yocto-gl) gives a few errors.

  1. In file yocto_mesh.cpp, at line 178 and forward there are three calls to isnan, which is not declared in the scope. Setting using std::isnan in the previous line fix the issue.
  2. In the "main" cmake file the usage of option to set the yocto variables, together with the version 3.12, causes any previously set value to be obscured. A version bump to 3.13 is enough to fix it.
  3. It would also be nice to an additional option to exclude the building of the apps when using as lib only, to do something like:
option(YOCTO_APPS "Build apps" ON)
...
if(YOCTO_APPS)
  add_subdirectory(apps)
endif(YOCTO_APPS)
  1. I had to add a target_include_directories(yocto PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..") in the cmake file in libs/yocto/ to be able to include any header from the library.
@xelatihy
Copy link
Owner

xelatihy commented Jan 1, 2022

Fixed in #1317

@xelatihy xelatihy closed this as completed Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants