Warning, /libraries/ksanecore/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: none 0002 # 0003 # SPDX-License-Identifier: BSD-2-Clause 0004 0005 add_library(KSaneCore${KSANECORE_SUFFFIX}) 0006 add_library(KSane${KSANECORE_SUFFFIX}::Core ALIAS KSaneCore${KSANECORE_SUFFFIX}) 0007 0008 set_target_properties(KSaneCore${KSANECORE_SUFFFIX} PROPERTIES 0009 VERSION ${KSANECORE_VERSION} 0010 SOVERSION ${KSANECORE_SOVERSION} 0011 EXPORT_NAME "Core" 0012 ) 0013 0014 target_compile_definitions(KSaneCore${KSANECORE_SUFFFIX} PRIVATE -DTRANSLATION_DOMAIN=\"ksanecore\") 0015 0016 target_sources(KSaneCore${KSANECORE_SUFFFIX} PRIVATE 0017 finddevicesthread.cpp 0018 scanthread.cpp 0019 imagebuilder.cpp 0020 interface.cpp 0021 interface_p.cpp 0022 authentication.cpp 0023 option.cpp 0024 internaloption.cpp 0025 deviceinformation.cpp 0026 options/baseoption.cpp 0027 options/actionoption.cpp 0028 options/booloption.cpp 0029 options/stringoption.cpp 0030 options/gammaoption.cpp 0031 options/integeroption.cpp 0032 options/doubleoption.cpp 0033 options/listoption.cpp 0034 options/invertoption.cpp 0035 options/pagesizeoption.cpp 0036 options/batchmodeoption.cpp 0037 options/batchdelayoption.cpp 0038 ) 0039 0040 ecm_qt_declare_logging_category(KSaneCore${KSANECORE_SUFFFIX} 0041 HEADER ksanecore_debug.h 0042 IDENTIFIER KSANECORE_LOG 0043 CATEGORY_NAME org.kde.ksane.core 0044 ) 0045 0046 if (QT_MAJOR_VERSION STREQUAL "5") 0047 set(_generate_export_header_version_args) 0048 else() 0049 # For Qt6/KF6 world transitively include the version header 0050 if(ECM_VERSION VERSION_LESS "5.106") 0051 set(include_version_header_code "#include <ksanecore_version.h>\n") 0052 set(_generate_export_header_version_args CUSTOM_CONTENT_FROM_VARIABLE include_version_header_code) 0053 else() 0054 set(_generate_export_header_version_args USE_VERSION_HEADER) 0055 endif() 0056 endif() 0057 0058 ecm_generate_export_header(KSaneCore${KSANECORE_SUFFFIX} 0059 BASE_NAME KSaneCore 0060 VERSION ${KSANECORE_VERSION} 0061 DEPRECATED_BASE_VERSION 0 0062 ${_generate_export_header_version_args} 0063 ) 0064 0065 target_include_directories(KSaneCore${KSANECORE_SUFFFIX} 0066 INTERFACE 0067 "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/KSaneCore${KSANECORE_SUFFFIX}>" 0068 PRIVATE 0069 ${CMAKE_CURRENT_SOURCE_DIR}/options 0070 ) 0071 0072 target_link_libraries(KSaneCore${KSANECORE_SUFFFIX} 0073 PUBLIC 0074 Qt${QT_MAJOR_VERSION}::Core 0075 Qt${QT_MAJOR_VERSION}::Gui 0076 PRIVATE 0077 Sane::Sane 0078 KF${KF_MAJOR_VERSION}::I18n 0079 ) 0080 0081 ecm_generate_headers(KSaneCore_CamelCase_HEADERS 0082 HEADER_NAMES 0083 Interface 0084 Option 0085 DeviceInformation 0086 REQUIRED_HEADERS KSaneCore_HEADERS 0087 PREFIX KSaneCore 0088 RELATIVE "../src/" 0089 ) 0090 0091 # Install files 0092 0093 install(TARGETS KSaneCore${KSANECORE_SUFFFIX} 0094 EXPORT KSaneCore${KSANECORE_SUFFFIX}Targets 0095 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} 0096 ) 0097 0098 install(FILES 0099 "${CMAKE_CURRENT_BINARY_DIR}/ksanecore_export.h" 0100 DESTINATION "${KDE_INSTALL_INCLUDEDIR}/KSaneCore${KSANECORE_SUFFFIX}" 0101 COMPONENT Devel 0102 ) 0103 0104 install(FILES 0105 ${KSaneCore_HEADERS} 0106 DESTINATION "${KDE_INSTALL_INCLUDEDIR}/KSaneCore${KSANECORE_SUFFFIX}/ksanecore" 0107 COMPONENT Devel 0108 ) 0109 0110 install(FILES 0111 ${KSaneCore_CamelCase_HEADERS} 0112 DESTINATION "${KDE_INSTALL_INCLUDEDIR}/KSaneCore${KSANECORE_SUFFFIX}/KSaneCore" 0113 COMPONENT Devel 0114 )