diff --git a/CMakeLists.txt b/CMakeLists.txt index 9be4c2514..f975891c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,10 +192,23 @@ set_target_properties(torrent-rasterbar PROPERTIES SOVERSION 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(DIRECTORY include/libtorrent DESTINATION include PATTERN ".svn" EXCLUDE) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtorrent-rasterbar.pc DESTINATION lib/pkgconfig) # === build examples === if(build_examples) diff --git a/libtorrent-rasterbar-cmake.pc.in b/libtorrent-rasterbar-cmake.pc.in new file mode 100644 index 000000000..3af2b2ac5 --- /dev/null +++ b/libtorrent-rasterbar-cmake.pc.in @@ -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@ +