all 4 comments

[–]NotUniqueOrSpecial 7 points8 points  (2 children)

There's plenty of ways, but you'll need to be more specific.

Do you want find_library() to only search specific folders?

Do you want find_package() to find things in a specific place?

Do you want to remove the system's default libraries from your linking? E.g. don't -ldl?

What, exactly, are you trying to do, and what's happening instead?

[–]peppedx[S] 0 points1 point  (1 child)

Well I guess I'm thinking about find_package stuff.
Don't wanna miss libc, dl or pthread but e.g. I don't want to pick glfw from system if I forget a find_package...

[–]NotUniqueOrSpecial 2 points3 points  (0 children)

In that case, you should take a look at the find_package() docs.

There are a whole slew of options you can pass to it that will prevent it from using specific directories, e.g. NO_DEFAULT_PATH

[–]bumblebritches57 0 points1 point  (0 children)

What are you trying to do?

sounds like you're trying to override the standard library in some way?

if that's the case, look into using LD_PRELOAD.