CMakeLists: add rules for installation

This commit adds some CMake rules that allow to do a "make install" to
install the zxing binary, its library and corresponding header files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Thomas Petazzoni 2015-10-04 11:49:52 +01:00
parent 4abdbb62c9
commit 2bc58a87dd

View File

@ -68,6 +68,10 @@ file(GLOB_RECURSE ZXING_FILES
)
add_executable(zxing ${ZXING_FILES})
target_link_libraries(zxing libzxing)
install(TARGETS zxing libzxing
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
install(DIRECTORY core/src/zxing/ DESTINATION include/zxing FILES_MATCHING PATTERN "*.h")
# Add testrunner executable.
find_package(CPPUNIT)