Added support for pkgconfig
This commit is contained in:
parent
a84c1af98a
commit
ff6e6bdfd5
@ -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(
|
|||||||
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)
|
||||||
|
11
yaml-cpp.pc.cmake
Normal file
11
yaml-cpp.pc.cmake
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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}
|
Loading…
Reference in New Issue
Block a user