I have developed a library to a target for my project where i am facing an intresting issue related to relative path of CMAKE. During QNX debug build, linker is trying to link lib as absolute path instead of relative path.
Ex:
[100%] Linking CXX executable SampleMain
cd D:/Repo/build-CMake_Sample_inclib-HMI_Qnx-Debug/SampleApp && C:/qnx700/host/win64/x86_64/usr/bin/qcc.exe -Vgcc_ntoaarch64le -lang-c++ -g -g “CMakeFiles/SampleMain.dir/src/main.cpp.o” -o SampleMain -Wl,-rpath,D:/Repo/CMake_Sample_inclib/inclib/lib D:/Repo/CMake_Sample_inclib/inclib/lib/libincrtos.so
The expectation is
[100%] Linking CXX executable SampleMain
cd D:/Repo/build-CMake_Sample_inclib-HMI_Qnx-Debug/SampleApp && C:/qnx700/host/win64/x86_64/usr/bin/qcc.exe -Vgcc_ntoaarch64le -lang-c++ -g -g “CMakeFiles/SampleMain.dir/src/main.cpp.o” -o SampleMain -Wl,-rpath,…/…/CMake_Sample_inclib/inclib/lib /lib/libincrtos.so