Locating libconfig from CMake-based projects
authorThomas Fischer <fischer@unix-ag.uni-kl.de>
Wed, 14 Oct 2015 18:46:35 +0000 (20:46 +0200)
committerThomas Fischer <fischer@unix-ag.uni-kl.de>
Wed, 14 Oct 2015 18:46:35 +0000 (20:46 +0200)
commit8aa02d68ff54006303e1f0b64475bc1163df8913
tree9e07c9fa40975204cb1d5371478e9e7ddcae8c35
parent4ac539a2dee761bc161bb13b92e108d799ca91c8
Locating libconfig from CMake-based projects

Configuration files for CMake are provided to simplify
locating libconfig from within project that use CMake
as their build system.
Separate configuration files are provided for C and C++
builds.

In a CMakeLists.txt file, use the following commands to
locate libconfig:

- To locate the library, use either
    find_package(libconfig)
  or
    find_package(libconfig++)

- The include directories are available as variables
    LIBCONFIG_INCLUDE_DIRS
  and
    LIBCONFIG++_INCLUDE_DIRS
  respectively, and can be used like this:
    include_directories(${LIBCONFIG++_INCLUDE_DIRS})

- Link to libconfig using variables
    LIBCONFIG_LIBRARIES
  and
    LIBCONFIG++_LIBRARIES
  respectively, by writing:
    target_link_libraries(${PROJECT_NAME}
      ${LIBCONFIG++_LIBRARIES}
    )
ChangeLog
configure
configure.ac
debian/libconfig++9-dev.install
debian/libconfig9-dev.install
lib/Makefile.am
lib/Makefile.in
lib/libconfig++Config.cmake.in [new file with mode: 0644]
lib/libconfigConfig.cmake.in [new file with mode: 0644]
libconfig.spec.in