Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8378453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:56:01+00:00 2026-06-09T15:56:01+00:00

I am trying to link against the libconfig++ library using cmake. I installed the

  • 0

I am trying to link against the libconfig++ library using cmake. I installed the library
using apt-get so I am assuming it will have a .cmake file so I can use find_package. Problem is I don’t know what package name to use. I tried libconfig, config, config++ as the package name to no avail.

As a general question, how does one find out which package is associated with a library.

I know that find_package looks into CMAKE_MODULE_PATH to see if there is a .cmake script. How to I find out what is the value of CMAKE_MODULE_PATH on my system. It’s not an environment variable. I am running ubuntu 12.04.

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:56:02+00:00Added an answer on June 9, 2026 at 3:56 pm

    To use find_package you need to have corresponding Find or Config cmake file. But library may not to provide it, seems with your library is such a case. You can use find_library for finding libraries and find_path to find include directories. With these commands you can even write FindXXX.cmake yourself.

    CMAKE_MODULE_PATH is not an environment variable, it is CMake’s one. This variable is intended for you to set, if you have additional directories with modules, by default it’s empty. This is used in the “Module” mode. In this mode CMake searches FindXXX.cmake in the CMAKE_MODULE_PATH (your modules) or in modules shipped with CMake and if it’s found, it then used to find library and it’s headers.

    If that module wasn’t found, it then switches into “Config” mode. On Unix it searches for ConfigXXX.cmake in the following directories:

    <prefix>/(lib/<arch>|lib|share)/cmake/<name>*/
    <prefix>/(lib/<arch>|lib|share)/<name>*/
    <prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/
    

    This files is shipped with the library, so there is no need to find anything, they contain all information, where library and includes located, etc.

    About naming scheme, there is no standard one. You can look at Standard CMake modules. Modules found in internet for your library named FindLibConfig.cmake

    For your case, library ships without corresponding cmake file, so you should write it your self (or find already written) and add directory with that file to CMAKE_MODULE_PATH.

    I suggest you to read how find_package command works and how to write FindXXX.cmake files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to link my program to the shared library. Im using a makefile
I've been trying to statically link against a C++ library called Poco on Windows
I'm trying to link my XPCOM extension against the 1.9.3a3pre SDK and I get
I am trying to make my autotools project in C++ link against library, that
Trying to link against a static assimp library which I built with MinGW. Here
I'm trying to link against a library (libcef_wrapper_dll.lib) that was built with the /MDd
I am trying to link to an external link using the anchor tag like
i am trying to link a Unity game to a Java server using C#
I'm trying to link two tables in the same database using a third. The
I am trying to link a remote database to a local database using dblink.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.