diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9ead55ed..7e056485 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,9 +24,15 @@ set(SOURCES QZXing_global.h ) +SET(INSTALL_HEADERS + QZXing.h + QZXing_global.h + ) + if(QZXING_MULTIMEDIA) LIST(APPEND SOURCES QZXingFilter.cpp QZXingFilter.h) + LIST(APPEND INSTALL_HEADERS QZXingFilter.h) add_definitions(-DQZXING_MULTIMEDIA) SET(QZXING_USE_QML ON) @@ -35,6 +41,7 @@ endif(QZXING_MULTIMEDIA) if(QZXING_USE_QML) LIST(APPEND SOURCES QZXingImageProvider.cpp QZXingImageProvider.h) + LIST(APPEND INSTALL_HEADERS QZXingImageProvider.h) add_definitions(-DQZXING_QML) endif(QZXING_USE_QML) @@ -85,3 +92,7 @@ target_include_directories(qzxing $ ) +# Install files +install(TARGETS qzxing EXPORT qzxing-config DESTINATION lib) +install(FILES ${INSTALL_HEADERS} DESTINATION include/qzxing) +install(EXPORT qzxing-config DESTINATION lib/cmake/qzxing)