Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

There is nothing to fix, you just need to setup your CMake project correctly (enable LIBIGL_WITH_TRIANGLE, and link against the CMake target igl::triangle). #6

Open
jseamon2 opened this issue Jan 23, 2023 · 3 comments

Comments

@jseamon2
Copy link

          There is nothing to fix, you just need to setup your CMake project correctly (enable `LIBIGL_WITH_TRIANGLE`, and link against the CMake target `igl::triangle`).

Originally posted by @jdumas in libigl/libigl#1635 (comment)

I'm fairly new to CMake. Where would I go to enable 'LIBIGL_WITH_TRIANGLE'? Is that just in one of the CMake files?

@alecjacobson
Copy link
Contributor

Take a look here https://github.com/libigl/libigl-example-project/blob/main/CMakeLists.txt

There have been a few changes since the comments on that linked issue. You could either do

option(LIBIGL_RESTRICTED_TRIANGLE "Build target igl_restricted::triangle" ON)
include(libigl)

or

include(libigl)
igl_include(restricted triangle)

@jseamon2
Copy link
Author

Thank you for the reply! I tried implementing both options you suggested with the CMakeLists from the example, but I keep getting the same build error. That build error says "Build step for triangle failed". Any suggestions on what I am doing wrong?

CMakeLists.txt

@alecjacobson
Copy link
Contributor

Could you try this? and if it doesn't work, post an issue on that repo so it's easier to track

https://github.com/alecjacobson/libigl-example-triangle

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants