cmake: install pkg config file

This commit is contained in:
Gabor Buella 2017-04-30 11:48:23 +02:00
parent 8d5436b4e3
commit 98a0d39fd3
2 changed files with 8 additions and 0 deletions

View File

@ -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 ()

6
capstone.pc.in Normal file
View File

@ -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