pkg-config support in CMakeLists.txt
This commit is contained in:
parent
e21e05e493
commit
a72dc4a75d
|
@ -192,10 +192,23 @@ set_target_properties(torrent-rasterbar PROPERTIES
|
||||||
SOVERSION 1
|
SOVERSION 1
|
||||||
VERSION 1)
|
VERSION 1)
|
||||||
|
|
||||||
|
set (VERSION "0.15-svn")
|
||||||
|
|
||||||
|
get_property (COMPILETIME_OPTIONS_LIST
|
||||||
|
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIRECTORY}
|
||||||
|
PROPERTY COMPILE_DEFINITIONS
|
||||||
|
)
|
||||||
|
foreach (s ${COMPILETIME_OPTIONS_LIST})
|
||||||
|
set (COMPILETIME_OPTIONS "${COMPILETIME_OPTIONS} -D${s}")
|
||||||
|
endforeach (s)
|
||||||
|
|
||||||
|
configure_file(libtorrent-rasterbar-cmake.pc.in libtorrent-rasterbar.pc)
|
||||||
|
|
||||||
install(TARGETS torrent-rasterbar DESTINATION lib)
|
install(TARGETS torrent-rasterbar DESTINATION lib)
|
||||||
install(DIRECTORY include/libtorrent
|
install(DIRECTORY include/libtorrent
|
||||||
DESTINATION include
|
DESTINATION include
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar.pc DESTINATION lib/pkgconfig)
|
||||||
|
|
||||||
# === build examples ===
|
# === build examples ===
|
||||||
if(build_examples)
|
if(build_examples)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
Name: libtorrent-rasterbar
|
||||||
|
Description: Bittorrent library.
|
||||||
|
Version: @VERSION@
|
||||||
|
Libs: -L${CMAKE_INSTALL_PREFIX}/lib -ltorrent-rasterbar
|
||||||
|
Cflags: -I${CMAKE_INSTALL_PREFIX} -I${CMAKE_INSTALL_PREFIX}/libtorrent @COMPILETIME_OPTIONS@ @CPPFLAGS@ @CXX_DEFINES@
|
||||||
|
|
Loading…
Reference in New Issue