I am sorry I forget to tell that I use ubuntu 18.04,

** Description changed:

+ 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(libmongoc-1.0 REQUIRED)
  </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/x86_64-linux-gnu/cmake/libbson-1.0/libbson-1.0-config.cmake:28 
(message):
-   File or directory /usr/lib/include/libbson-1.0 referenced by variable
-   BSON_INCLUDE_DIRS does not exist !
+   File or directory /usr/lib/include/libbson-1.0 referenced by variable
+   BSON_INCLUDE_DIRS does not exist !
  Call Stack (most recent call first):
-   /usr/lib/x86_64-linux-gnu/cmake/libbson-1.0/libbson-1.0-config.cmake:32 
(set_and_check)
-   /usr/lib/x86_64-linux-gnu/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake:20 
(find_package)
-   CMakeLists.txt:3 (find_package)
- 
+   /usr/lib/x86_64-linux-gnu/cmake/libbson-1.0/libbson-1.0-config.cmake:32 
(set_and_check)
+   /usr/lib/x86_64-linux-gnu/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake:20 
(find_package)
+   CMakeLists.txt:3 (find_package)
  
  CMake Warning (dev) in CMakeLists.txt:
-   No cmake_minimum_required command is present.  A line of code such as
+   No cmake_minimum_required command is present.  A line of code such as
  
-     cmake_minimum_required(VERSION 3.10)
+     cmake_minimum_required(VERSION 3.10)
  
-   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 &quot;cmake --help-policy CMP0000&quot;.
+   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 &quot;cmake --help-policy CMP0000&quot;.
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Configuring incomplete, errors occurred!
  See also &quot;/tmp/libmongo/CMakeFiles/CMakeOutput.log&quot;</pre>
  
  The libmongoc provided cmake file tries to create a PATH for BSON which it 
does like this:
  <pre>get_filename_component(PACKAGE_PREFIX_DIR 
"${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)</pre>
  
  But the result is clearly not good: /usr/lib/include/libbson-1.0 (
  lib/include ?! )

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1790771

Title:
  cmake find_package incorrect path resolve

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libmongoc/+bug/1790771/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to