C

Qt Quick Ultralite perspective_transforms Example

cmake_minimum_required (VERSION 3.15)

project(perspective_transforms VERSION 0.0.1 LANGUAGES C CXX ASM)
if (NOT TARGET Qul::QuickUltralite)
    find_package(Qul)
endif()

qul_add_target(perspective_transforms)

qul_target_qml_sources(perspective_transforms
    perspective_transforms.qml
    Cover.qml
    CoverFlow.qml
    CoverFlowState.qml
    IdleTimer.qml
    controls/Slider.qml
    controls/RadioButton.qml
    controls/CheckBox.qml
)

# All images are free and downloaded from unsplash.com
# https://unsplash.com/license
set(IMAGES
    resources/cover0.jpg
    resources/cover1.jpg
    resources/cover2.jpg
    resources/cover3.jpg
    resources/cover4.jpg
    resources/cover5.jpg
    resources/cover6.jpg
    resources/cover7.jpg
    resources/cover8.jpg
    resources/cover9.jpg
)

# Optimize all assets for transformations
set_source_files_properties(${IMAGES} PROPERTIES QUL_OPTIMIZE_FOR_ROTATION ON)
qul_add_resource(perspective_transforms FILES ${IMAGES} BASE resources)

qul_add_qml_module(perspective_transforms_constants
    URI Constants
    QML_FILES
        imports/constants/Constants.qml
        imports/constants/CoverFlowType.qml
    OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/modules
)

target_link_libraries(perspective_transforms
    Qul::QuickUltraliteControlsStyleDefault
    perspective_transforms_constants
)

app_target_setup_os(perspective_transforms)
app_target_default_entrypoint(perspective_transforms perspective_transforms)