cmake find_package incorrect path resolve
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmongoc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I experience this issue on Ubuntu 18.04
I wanted to use libmongoc-1.0 with cmake building a software. But the find_package is not successful due to a not existing path (probably wrong path is calculated)
Reproduction:
* install libmongoc-dev and cmake
* create the following dummy cmake project:
<pre>
project(foo C)
find_package(
</pre>
* execute cmake .
* the result:
<pre>-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /usr/lib/
File or directory /usr/lib/
BSON_INCLUDE_DIRS does not exist !
Call Stack (most recent call first):
/usr/
/usr/
CMakeLists.txt:3 (find_package)
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_
cmake_
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/
The libmongoc provided cmake file tries to create a PATH for BSON which it does like this:
<pre>get_
But the result is clearly not good: /usr/lib/
no longer affects: | syslog-ng (Ubuntu) |
I am sorry I forget to tell that I use ubuntu 18.04,