From 98a0d39fd3aff20c9284da4cfdbdfb657c657ab5 Mon Sep 17 00:00:00 2001 From: Gabor Buella Date: Sun, 30 Apr 2017 11:48:23 +0200 Subject: [PATCH] cmake: install pkg config file --- CMakeLists.txt | 2 ++ capstone.pc.in | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 capstone.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e301128..c164f85b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -462,6 +462,7 @@ source_group("Include\\TMS320C64x" FILES ${HEADERS_TMS320C64X}) ## installation install(FILES ${HEADERS_COMMON} DESTINATION include/capstone) +configure_file(capstone.pc.in capstone.pc) if (CAPSTONE_BUILD_STATIC) install(TARGETS capstone-static @@ -483,4 +484,5 @@ add_executable(cstool ${CSTOOL_SRC}) target_link_libraries(cstool ${default-target}) install(TARGETS cstool DESTINATION bin) +install(FILES ${CMAKE_BINARY_DIR}/capstone.pc DESTINATION lib/pkgconfig) endif () diff --git a/capstone.pc.in b/capstone.pc.in new file mode 100644 index 00000000..695548e6 --- /dev/null +++ b/capstone.pc.in @@ -0,0 +1,6 @@ +Name: capstone +Description: Capstone disassembly engine +Version: @VERSION_MAJOR@.@VERSION_MAJOR@.@VERSION_PATCH@ +URL: http://www.capstone-engine.org +Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lcapstone +Cflags: -I@CMAKE_INSTALL_PREFIX@/include/capstone