MultiNest
MultiNest copied to clipboard
example_eggbox_C: fix call to FIND_LIBRARY()
The call to FIND_LIBRARY() is not correct, it should first take the name of a variable where to store the location of the found library location before the name of the library. This resolves a potential failure of the cmake call which leads to the following error:
CMake Error at src/example_eggbox_C/CMakeLists.txt:7 (FIND_LIBRARY): Could not find m using the following names:
Additionaly this commit adjusts the call to target_link_libraries() accordingly to use the result of FIND_LIBRARY().
Two questions:
- how did this ever work
- does this also affect the other examples?
I wonder how we should also inform upstream (https://github.com/farhanferoz/MultiNest) about this, but I am not sure how well-maintained it still is and how much this branch and theirs has diverged by now.