mirror of https://github.com/status-im/qzxing.git
Merge pull request #201 from vpicaver/master
Properly exported the defines for CMake users
This commit is contained in:
commit
8a36df7f57
|
@ -38,6 +38,10 @@ if(QZXING_USE_QML)
|
|||
add_definitions(-DQZXING_QML)
|
||||
endif(QZXING_USE_QML)
|
||||
|
||||
if(QZXING_USE_ENCODER)
|
||||
add_definitions(-DENABLE_ENCODER_GENERIC -DENABLE_ENCODER_QR_CODE)
|
||||
endif(QZXING_USE_ENCODER)
|
||||
|
||||
add_library(qzxing "" ${SOURCES})
|
||||
|
||||
if(WIN32)
|
||||
|
@ -49,6 +53,10 @@ if(WIN32)
|
|||
add_definitions(-DNO_ICONV)
|
||||
endif(WIN32)
|
||||
|
||||
if(ANDROID)
|
||||
add_definitions(-DNO_ICONV)
|
||||
endif()
|
||||
|
||||
if(VS_WINRT_COMPONENT)
|
||||
add_definitions(-DNO_ICONV)
|
||||
endif(VS_WINRT_COMPONENT)
|
||||
|
@ -61,6 +69,7 @@ target_link_libraries(qzxing Qt5::Core Qt5::Gui)
|
|||
|
||||
if(QZXING_MULTIMEDIA)
|
||||
target_link_libraries(qzxing Qt5::Multimedia)
|
||||
target_compile_definitions(qzxing PUBLIC -DQZXING_MULTIMEDIA)
|
||||
endif(QZXING_MULTIMEDIA)
|
||||
|
||||
if(QZXING_USE_QML)
|
||||
|
@ -68,8 +77,38 @@ if(QZXING_USE_QML)
|
|||
Qt5::Svg
|
||||
Qt5::Quick
|
||||
Qt5::QuickControls2)
|
||||
target_compile_definitions(qzxing PUBLIC -DQZXING_QML)
|
||||
endif(QZXING_USE_QML)
|
||||
|
||||
if(QZXING_USE_ENCODER)
|
||||
target_compile_definitions(qzxing PUBLIC -DENABLE_ENCODER_GENERIC -DENABLE_ENCODER_QR_CODE)
|
||||
endif(QZXING_USE_ENCODER)
|
||||
|
||||
if(QZXING_USE_DECODER_QR_CODE)
|
||||
target_compile_definitions(qzxing PRIVATE -DENABLE_DECODER_QR_CODE)
|
||||
endif()
|
||||
|
||||
if(QZXING_USE_DECODER_1D_BARCODES)
|
||||
target_compile_definitions(qzxing PRIVATE -DENABLE_DECODER_1D_BARCODES)
|
||||
endif()
|
||||
|
||||
if(QZXING_USE_DECODER_DATA_MATRIX)
|
||||
target_compile_definitions(qzxing PRIVATE -DENABLE_DECODER_DATA_MATRIX)
|
||||
endif()
|
||||
|
||||
if(QZXING_USE_DECODER_AZTEC)
|
||||
target_compile_definitions(qzxing PRIVATE -DENABLE_DECODER_AZTEC)
|
||||
endif()
|
||||
|
||||
if(QZXING_USE_DECODER_PDF17)
|
||||
target_compile_definitions(qzxing PRIVATE -DENABLE_DECODER_PDF17)
|
||||
endif()
|
||||
|
||||
if(QZXING_USE_DECODER_1D_BARCODES)
|
||||
target_compile_definitions(qzxing PRIVATE -DENABLE_DECODER_1D_BARCODES)
|
||||
endif()
|
||||
|
||||
|
||||
# Change Global Definitions depending on how you want to use the library
|
||||
target_compile_definitions(qzxing PUBLIC DISABLE_LIBRARY_FEATURES)
|
||||
|
||||
|
|
Loading…
Reference in New Issue