Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Could not find a package configuration file provided by "CLI11" #54

Open
asurada404 opened this issue Aug 27, 2020 · 10 comments
Open

Could not find a package configuration file provided by "CLI11" #54

asurada404 opened this issue Aug 27, 2020 · 10 comments

Comments

@asurada404
Copy link

I use the 5th method to install CLI11.
But I got the following error.


(base) xxx@goodnews:~/projects/DeepSDF/build$ cmake ..
CMake Error at CMakeLists.txt:6 (find_package):
  Could not find a package configuration file provided by "CLI11" with any of
  the following names:

    CLI11Config.cmake
    cli11-config.cmake

  Add the installation prefix of "CLI11" to CMAKE_PREFIX_PATH or set
  "CLI11_DIR" to a directory containing one of the above files.  If "CLI11"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/xxx/projects/DeepSDF/build/CMakeFiles/CMakeOutput.log".
@MChaus
Copy link

MChaus commented Aug 29, 2020

Execute commands below:
git clone https://github.com/CLIUtils/CLI11
cd CLI11/
mkdir build
cd build
git submodule update --init
cmake ..
cmake --build .
sudo cmake --install .
This will install CLI11 globaly.
Also you can use local options proposed at CLI README. But in this case you will have to change CMakeLists.txt.

@asurada404
Copy link
Author

I'm sorry that this method doesn't work for me. Because I didn't have root permission.

@MChaus
Copy link

MChaus commented Aug 29, 2020

As I said you can put CLI11 localy. And then change CMakeLists.txt file of the project as stated here:

Local headers and target: Use include/CLI/*.hpp files. With CMake, you can use add_subdirectory and the CLI11::CLI11 interface target when linking. If not using a submodule, you must ensure that the copied files are located inside the same tree directory than your current project, to prevent an error with CMake and add_subdirectory.

@Cyprus-hy
Copy link

Cyprus-hy commented Oct 11, 2020

Execute commands below:
git clone https://github.com/CLIUtils/CLI11
cd CLI11/
mkdir build
cd build
git submodule update --init
cmake ..
cmake --build .
sudo cmake --install .
This will install CLI11 globaly.
Also you can use local options proposed at CLI README. But in this case you will have to change CMakeLists.txt.

I meet the same question, and I try to solve it as you said. But it doesn't work. So did you put all the dependencies in the directory ./third-party/cnpy or any other place? Thanks.

@Sheradil
Copy link

Same for me.
Didn't get it to work on my own. The proposed solution doesn't work as well, though.
Still failing with the error message mentioned by @asurada404

@suyz526
Copy link

suyz526 commented Oct 21, 2020

@Sheradil @Cyprus-hy

Have you checked if the folder "/usr/local/include/CLI" exist?

I installed this lib with the classical way by using sudo make install

I didn't try sudo cmake --install .

@Sheradil
Copy link

@suyz526
Thank you so much. The folder did not exist, even though the cmake script ran without errors.
sudo make install did work, though and created the folder.
Had to fix another error with nanoflann to make it work before I could create the binaries.

@suyz526
Copy link

suyz526 commented Oct 22, 2020

@Sheradil
I have met some problem that the hpp file can't be found. And I copied some files manually.

like: sudo cp -r mpark/ /usr/local/include/

Maybe you also need to do such kind of things later.

@novauto-nju
Copy link

Hi, I'm a newbie in code. I'm going to implement this project. Can you tell me your version of the environment? Maybe like conda_env?

@DerekGrant
Copy link

DerekGrant commented Apr 8, 2022

I met the same problem due to a lack of catch2.
Because I can't download catch2 when I cmake CLI11
so I download catch 2 from https://github.com/philsquared/Catch/releases/download/v2.13.7/catch.hpp
and let cmakelist use the local file
go to /CLI11/tests/CMakeLists.txt modify you file path and hash value like this:

#if(Catch2_FOUND)
 if(NOT TARGET Catch2::Catch2)
  message(FATAL_ERROR "Found Catch2 at ${Catch2_DIR} but targets are missing.")
 endif()
 message(STATUS "Found Catch2")
 target_link_libraries(catch_main PUBLIC Catch2::Catch2)
 message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/catch2")
 #else()
 message(STATUS "Downloading Catch2")


 file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/catch2")
 #set(url https://github.com/philsquared/Catch/releases/download/v2.13.7/catch.hpp)
 set(url /home/xianbin/CLI11/tests/catch.hpp)
 file(
  DOWNLOAD ${url} "${CMAKE_CURRENT_BINARY_DIR}/catch2/catch.hpp"
  STATUS status
  #EXPECTED_HASH SHA256=ea379c4a3cb5799027b1eb451163dff065a3d641aaba23bf4e24ee6b536bd9bc)
  #EXPECTED_HASH SHA256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)
  EXPECTED_HASH SHA256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)
  list(GET status 0 error)
 if(error)
  message(FATAL_ERROR "Could not download ${url}, and Catch2 not found on your system.")
 endif()
 target_include_directories(catch_main PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
 #endif()

then cmake, that will be okay

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants