Improved resolving libraries for cross-compilation use-case - #295
Improved resolving libraries for cross-compilation use-case#295redradist wants to merge 1 commit into
Conversation
|
|
|
@czoido Could you please review this changes ? |
|
Hi @redradist |
@czoido It is helpful, because when on embedded system you try to link library it cannot be found because library is searched first in |
|
Hi @redradist, |
|
Hi @redradist, include(conan.cmake)
conan_cmake_run(REQUIRES fmt/6.1.2
BASIC_SETUP
BUILD missing)
add_executable(main main.cpp)
target_link_libraries(main ${CONAN_LIBS})to this include(conan.cmake)
conan_cmake_run(REQUIRES fmt/6.1.2
BASIC_SETUP CMAKE_TARGETS
BUILD missing)
add_executable(main main.cpp)
target_link_libraries(main CONAN_PKG::fmt)Other option is adding that Please tell me if this helps. |
@czoido Okay, but with CONAN_PKG:: I have to repeat myself ... Then maybe we should introduce a new variable like ${CONAN_PKGS} that will contain full paths to library ? |
|
Hi @redradist, |
@czoido Okay, I got your point, but it is not convenient to do the same thing in each CMakeLists.txt ... |
|
I am following the directions exactly and have a similar problem. Here my failure is generated by "Findmypackage.cmake" which was generated by conan. It fails to find the .lib files required. So this seems to be a more current problem with the new find-package workflow. |
This update is useful for cross-compilation, because some cross-compilers better workers with direct path to library