Skip to content
Snippets Groups Projects
Commit ff6e6bdf authored by Jesse Beder's avatar Jesse Beder
Browse files

Added support for pkgconfig

parent a84c1af9
No related branches found
No related tags found
No related merge requests found
......@@ -18,15 +18,17 @@ if(WIN32)
else(WIN32)
set(_library_dir lib)
endif(WIN32)
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
set(LIB_INSTALL_DIR ${_library_dir}${LIB_SUFFIX})
#
set(_INSTALL_DESTINATIONS
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${_library_dir}${LIB_SUFFIX}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
#
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
file(GLOB public_headers include/*.h)
file(GLOB private_headers src/*.h)
file(GLOB sources src/*.cpp)
......@@ -48,5 +50,10 @@ install(
DESTINATION ${INCLUDE_INSTALL_DIR}
)
if(UNIX)
configure_file("yaml-cpp.pc.cmake" yaml-cpp.pc @ONLY)
install(FILES yaml-cpp.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
endif(UNIX)
add_subdirectory (yaml-reader)
add_subdirectory (util)
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDE_INSTALL_DIR@
Name: Yaml-cpp
Description: A YAML parser for C++
Version: @YAML_CPP_VERSION@
Requires:
Libs: -L${libdir} -lyaml-cpp
Cflags: -I${includedir}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment