I simply don\'t want to set an environment variable every time i need a library, let a lone the paths searched are not standardized at all (at least on windows). Generally t
You can try to append paths to CMAKE_PREFIX_PATH in your project CMakeLists.txt, something like this:
list(APPEND CMAKE_PREFIX_PATH "/tmp/test" "/another/library/path")
According to the documentation, it will append "/lib" to the end of each path in the list and search for libraries there, but with some quick testing, it seems like cmake should find things alright if it's directly in a path you specify. For example, if I have /tmp/test/libtest.so
and add the line above, I can find it like so:
find_library(libtest_LIBRARY test)
Running cmake should set the cache variable libtest_LIBRARY
with the right path.