Warning, /libraries/kopeninghours/src/lib/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 ecm_qt_declare_logging_category(kopeninghours_srcs HEADER logging.h IDENTIFIER KOpeningHours::Log CATEGORY_NAME org.kde.kopeninghours)
0005 flex_target(openinghoursscanner
0006     openinghourslexer.l
0007     ${CMAKE_CURRENT_BINARY_DIR}/openinghourslexer.cpp
0008     DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/openinghoursscanner_p.h
0009     COMPILE_FLAGS "--nounistd"
0010 )
0011 bison_target(openinghoursparser
0012     openinghoursparser.y
0013     ${CMAKE_CURRENT_BINARY_DIR}/openinghoursparser.cpp
0014     DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/openinghoursparser_p.h
0015 )
0016 add_flex_bison_dependency(openinghoursscanner openinghoursparser)
0017 set_source_files_properties(${BISON_openinghoursparser_OUTPUTS} ${FLEX_openinghoursscanner_OUTPUTS} PROPERTIES SKIP_AUTOMOC ON)
0018 
0019 if (NOT VALIDATOR_ONLY)
0020     list(APPEND kopeninghours_srcs
0021         display.cpp
0022         easter.cpp
0023         evaluator.cpp
0024         holidaycache.cpp
0025         intervalmodel.cpp
0026         display.h
0027         easter_p.h
0028         holidaycache_p.h
0029         intervalmodel.h
0030     )
0031 endif()
0032 
0033 add_library(KOpeningHours
0034     ${kopeninghours_srcs}
0035     ${BISON_openinghoursparser_OUTPUTS}
0036     ${FLEX_openinghoursscanner_OUTPUTS}
0037     interval.cpp
0038     openinghours.cpp
0039     rule.cpp
0040     selectors.cpp
0041     interval.h
0042     openinghours.h
0043     rule_p.h
0044     selectors_p.h
0045 )
0046 
0047 generate_export_header(KOpeningHours BASE_NAME KOpeningHours)
0048 
0049 set_target_properties(KOpeningHours PROPERTIES
0050     VERSION ${KOPENINGHOURS_VERSION_STRING}
0051     SOVERSION ${KOPENINGHOURS_SOVERSION}
0052     EXPORT_NAME KOpeningHours
0053 )
0054 target_link_libraries(KOpeningHours
0055     PUBLIC
0056         Qt::Core
0057 )
0058 if (VALIDATOR_ONLY)
0059     target_compile_definitions(KOpeningHours PUBLIC KOPENINGHOURS_VALIDATOR_ONLY)
0060 else()
0061     target_link_libraries(KOpeningHours
0062         PRIVATE
0063             KF5::Holidays
0064             KF5::I18n
0065     )
0066 endif()
0067 
0068 ecm_generate_headers(KOpeningHours_FORWARDING_HEADERS
0069     HEADER_NAMES
0070         Display
0071         Interval
0072         IntervalModel
0073         OpeningHours
0074     PREFIX KOpeningHours
0075     REQUIRED_HEADERS KOpeningHours_HEADERS
0076 )
0077 
0078 install(TARGETS KOpeningHours EXPORT KOpeningHoursTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0079 if (KDE_INSTALL_LOGGINGCATEGORIESDIR) # added by ECM 5.59
0080     install(FILES org_kde_kopeninghours.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
0081 endif()
0082 install(FILES
0083     ${KOpeningHours_FORWARDING_HEADERS}
0084     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KOpeningHours
0085 )
0086 install(FILES
0087     ${KOpeningHours_HEADERS}
0088     ${CMAKE_CURRENT_BINARY_DIR}/kopeninghours_export.h
0089     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kopeninghours
0090 )
0091 
0092 if (BUILD_QCH)
0093     ecm_add_qch(
0094         KOpeningHours_QCH
0095         NAME KOpeningHours
0096         BASE_NAME KOpeningHours
0097         VERSION ${RELEASE_SERVICE_VERSION}
0098         ORG_DOMAIN org.kde
0099         SOURCES # using only public headers, to cover only public API
0100         ${KOpeningHours_HEADERS}
0101         MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
0102         #IMAGE_DIRS "${CMAKE_SOURCE_DIR}/docs/pics"
0103         LINK_QCHS
0104             Qt5Core_QCH
0105         INCLUDE_DIRS
0106             ${CMAKE_CURRENT_BINARY_DIR}
0107         BLANK_MACROS
0108             KOPENINGHOURS_EXPORT
0109         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0110         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0111         COMPONENT Devel
0112     )
0113 endif()