# SPDX-FileCopyrightText: 2024 Open Mobile Platform LLC <community@omp.ru>
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.18)

project(ru.auroraos.PdfViewer DESCRIPTION "PdfViewer with pdfium")

include(ProcessorCount)
ProcessorCount(NCPU)
message(STATUS "Number of threads: ${NCPU}")

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
    set(_LIB_DIR "lib64")
else()
    set(_LIB_DIR "lib")
endif()
message(STATUS "Library directory name: ${_LIB_DIR}")

add_subdirectory(3rdparty/pdfium)
add_subdirectory(3rdparty/libjpeg)
add_subdirectory(amberpdf)
add_subdirectory(amberpdfqmlplugin)
add_subdirectory(application)

add_custom_target(OTHER_FILES
    SOURCES
    AUTHORS.md
    CHANGELOG.md
    CODE_OF_CONDUCT.md
    CONTRIBUTING.md
    LICENSE.BSD-3-Clause.md
    README.md
    README.ru.md
    rpm/ru.auroraos.PdfViewer.spec
)
