I have a CMake project where I'm building wxWidgets on the fly. The libraries are in a subdirectory of the build directory.
Unfortunately the CMAKE_FIND_ROOT_PATH gets prepended to the library name even though it's being provided as an absolute directory rather than a relative one.
From running cmake --debug-find:
find_library considered the following locations:
/usr/x86_64-w64-mingw32/sys-root/mingw/home/build/build/freedv/external/dist/lib/(lib|)wxregexu-3.1-x86_64-w64-mingw32(.dll|.dll.a|.a|.lib)
Obviously this is wrong. It should be using the path, /home/build/build/freedv/external/dist/lib, directly without prepending anything.
Help!
Thanks, Richard
Hi Richard
You can pass NO_CMAKE_FIND_ROOT_PATH to FIND_FILE if that's where the problem arises, i.e. in an project I have
FIND_FILE(_find_pyqt5_py FindPyQt5.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)
Best Sandro
On 13.08.20 23:05, Richard Shaw wrote:
I have a CMake project where I'm building wxWidgets on the fly. The libraries are in a subdirectory of the build directory.
Unfortunately the CMAKE_FIND_ROOT_PATH gets prepended to the library name even though it's being provided as an absolute directory rather than a relative one.
From running cmake --debug-find:
find_library considered the following locations:
/usr/x86_64-w64-mingw32/sys-root/mingw/home/build/build/freedv/external/dist/lib/(lib|)wxregexu-3.1-x86_64-w64-mingw32(.dll|.dll.a|.a|.lib)
Obviously this is wrong. It should be using the path, /home/build/build/freedv/external/dist/lib, directly without prepending anything.
Help!
Thanks, Richard
mingw mailing list -- mingw@lists.fedoraproject.org To unsubscribe send an email to mingw-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/mingw@lists.fedoraproject.org
On Thu, Aug 13, 2020 at 4:58 PM Sandro Mani manisandro@gmail.com wrote:
Hi Richard
You can pass NO_CMAKE_FIND_ROOT_PATH to FIND_FILE if that's where the problem arises, i.e. in an project I have
FIND_FILE(_find_pyqt5_py FindPyQt5.py PATHS ${CMAKE_MODULE_PATH} NO_CMAKE_FIND_ROOT_PATH)
That works if it's my CMake file, but this is using the system FindwxWidgets module.
Thanks, Richard