Commit ff6e6bdf authored by Jesse Beder's avatar Jesse Beder
Browse files

Added support for pkgconfig

parent a84c1af9
...@@ -18,15 +18,17 @@ if(WIN32) ...@@ -18,15 +18,17 @@ if(WIN32)
else(WIN32) else(WIN32)
set(_library_dir lib) set(_library_dir lib)
endif(WIN32) endif(WIN32)
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
set(LIB_INSTALL_DIR ${_library_dir}${LIB_SUFFIX})
# #
set(_INSTALL_DESTINATIONS set(_INSTALL_DESTINATIONS
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
LIBRARY DESTINATION ${_library_dir}${LIB_SUFFIX} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}
) )
# #
set(INCLUDE_INSTALL_DIR include/yaml-cpp)
file(GLOB public_headers include/*.h) file(GLOB public_headers include/*.h)
file(GLOB private_headers src/*.h) file(GLOB private_headers src/*.h)
file(GLOB sources src/*.cpp) file(GLOB sources src/*.cpp)
...@@ -48,5 +50,10 @@ install( ...@@ -48,5 +50,10 @@ install(
DESTINATION ${INCLUDE_INSTALL_DIR} 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 (yaml-reader)
add_subdirectory (util) 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}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment