0001-CMakeLists-add-rules-for-installation.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. From 2bc58a87dd629cef4cd2c62c5132c319bede61fa Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sun, 4 Oct 2015 11:49:52 +0100
  4. Subject: [PATCH] CMakeLists: add rules for installation
  5. This commit adds some CMake rules that allow to do a "make install" to
  6. install the zxing binary, its library and corresponding header files.
  7. Submitted upstream: https://github.com/glassechidna/zxing-cpp/pull/31
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. ---
  10. CMakeLists.txt | 4 ++++
  11. 1 file changed, 4 insertions(+)
  12. diff --git a/CMakeLists.txt b/CMakeLists.txt
  13. index f49b28d..7151d90 100644
  14. --- a/CMakeLists.txt
  15. +++ b/CMakeLists.txt
  16. @@ -68,6 +68,10 @@ file(GLOB_RECURSE ZXING_FILES
  17. )
  18. add_executable(zxing ${ZXING_FILES})
  19. target_link_libraries(zxing libzxing)
  20. +install(TARGETS zxing libzxing
  21. + LIBRARY DESTINATION lib
  22. + RUNTIME DESTINATION bin)
  23. +install(DIRECTORY core/src/zxing/ DESTINATION include/zxing FILES_MATCHING PATTERN "*.h")
  24. # Add testrunner executable.
  25. find_package(CPPUNIT)
  26. --
  27. 2.6.0