Comments (6)
Hi Marco,
CMake needs a custom findXXX.cmake file in every package in order to find them trough a find_package(XXX). My packages do not provide yet a findXXX.cmake. I will upload soon!
Actually, CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH are pointing to your libxml packages, but find_package do not use those variables to find the sources (yeah, it's annoying). Those custom find_package files do a lot of crazy things looking in common paths, appending common names and many other, but never look in CMAKE_LIBRARY_PATH.
Meanwhile you can omit the use of find_package and just link with CONAN_LIBS_LIBXML2 or the global CONAN_LIBS
Thanks for try it Marco!
Cheers
from conan.
Hi,
Well, you probably know CMake better than I do to be honest :-) I never looked at this in detail, but up till now I have been using these to supply the path to my local installs of boost, like so:
CMAKE_INCLUDE_PATH=/usr/local/personal/include CMAKE_LIBRARY_PATH=/usr/local/personal/lib CC=gcc-5 CXX=g++-5 cmake ../../../ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DWITH_LATEX=FALSE && ninja -j5
This has worked fine for me locally, with the personal boost version taking precedence over the system installed one (and no changes required in the find boost etc). I also did this for windows using NuGet packages (LibXml) and it worked as well. Finally I did a quick search and found some other guys doing something similar for Qt on Windows [1]. I'm wondering - could it be CMake has changed behaviour recently since you guys looked at it?
Cheers
Marco
[1] http://stackoverflow.com/questions/10571249/cmake-qt-and-cmake-include-path
from conan.
Interesting! I looked again to CONAN_BASIC_SETUP and we are not setting directly CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH, I was wrong.
We are just calling to:
INCLUDE_DIRECTORIES(${CONAN_INCLUDE_DIRS})
LINK_DIRECTORIES(${CONAN_LIB_DIRS})
So maybe there is some unknow (by me) behaviour with CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH.
Thanks so much, I will try it!
PD: I think the key is that the findXXX recipes calls to find_library, and find_library looks in custom paths and "system" paths. Probably setting CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH will add places to look as "system" paths. Looks good!
from conan.
excellent, great news!
from conan.
It works!
I've open a PR, it will be (at least we find some problem) in conan 0.6
You can paste these lines after CONAN_BASIC_SETUP() call to fix all find_packages until we release conan 0.6
SET(CMAKE_INCLUDE_PATH ${CONAN_INCLUDE_DIRS} ${CMAKE_INCLUDE_PATH})
SET(CMAKE_LIBRARY_PATH ${CONAN_LIB_DIRS} ${CMAKE_LIBRARY_PATH})
Thanks a lot, its a big improvement! 👍
from conan.
No worries! I'll wait for v0.6 - it will get automatically picked up by the CI :-) I'll report back then.
Muchas gracias!
from conan.
Related Issues (20)
- [bug] MesonToolchain ignores tools.build:defines ... and tc.preprocess_definitions quote problems HOT 3
- [question] Include conan_provider.cmake inside of CMakeLists.txt HOT 1
- Make feasible for recipes to get a serialized subgraph of the current node HOT 1
- [feature] Add an option to keep the same tree for conan cache save HOT 7
- [bug] Unable to map additional imported locations HOT 10
- [question] Uploading packages with non-standard options to a private registry HOT 3
- [bug] Conan build fails to find CMakeLists when run in the root level of a drive HOT 5
- [question] How to use musl instead of glibc? HOT 1
- [bug] Cannot install packages on Ubuntu 24.04 HOT 3
- [bug] Cannot build Boost with Conan 2 HOT 7
- [question] How to properly build and install self-made headers and libraries with CMake and Conan for the consumer? HOT 5
- [question] profile argument not working HOT 4
- [question] how to ignore compiler version in package resolution? HOT 7
- System installed Hdf5 target disappears when using conan HOT 4
- [question] How to use Custom Generators HOT 5
- [question] How to I model private (lib-only) component dependencies? HOT 9
- [question] conan multi package/components question HOT 9
- [question] Defining different package_folder for VS HOT 9
- [question] how to configure Pico SDK to work Conan and CMake projects HOT 8
- [question] Getting the initial CWD in generate() and build() HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.