Warning, /frameworks/kunitconversion/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 add_library(KF6UnitConversion) 0002 add_library(KF6::UnitConversion ALIAS KF6UnitConversion) 0003 0004 set_target_properties(KF6UnitConversion PROPERTIES 0005 VERSION ${KUNITCONVERSION_VERSION} 0006 SOVERSION ${KUNITCONVERSION_SOVERSION} 0007 EXPORT_NAME UnitConversion 0008 ) 0009 0010 ecm_qt_declare_logging_category(KF6UnitConversion 0011 HEADER kunitconversion_debug.h 0012 IDENTIFIER LOG_KUNITCONVERSION 0013 CATEGORY_NAME kf.kunitconversion 0014 DESCRIPTION "kunitconversion" 0015 EXPORT KUNITCONVERSION 0016 ) 0017 0018 target_sources(KF6UnitConversion PRIVATE 0019 converter.cpp 0020 value.cpp 0021 unit.cpp 0022 unitcategory.cpp 0023 length.cpp 0024 area.cpp 0025 volume.cpp 0026 temperature.cpp 0027 velocity.cpp 0028 mass.cpp 0029 pressure.cpp 0030 energy.cpp 0031 currency.cpp 0032 power.cpp 0033 timeunit.cpp 0034 fuel_efficiency.cpp 0035 density.cpp 0036 weight_per_area.cpp 0037 acceleration.cpp 0038 force.cpp 0039 angle.cpp 0040 frequency.cpp 0041 thermal_conductivity.cpp 0042 thermal_flux.cpp 0043 thermal_generation.cpp 0044 voltage.cpp 0045 electrical_current.cpp 0046 electrical_resistance.cpp 0047 permeability.cpp 0048 binary_data.cpp 0049 ) 0050 0051 if (WIN32) 0052 # As stated in http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx M_PI only gets defined 0053 # when using MSVC if _USE_MATH_DEFINES is defined (this is needed for angle.cpp) 0054 target_compile_definitions(KF6UnitConversion PRIVATE _USE_MATH_DEFINES) 0055 endif() 0056 0057 ecm_generate_export_header(KF6UnitConversion 0058 BASE_NAME KUnitConversion 0059 EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kunitconversion/kunitconversion_export.h 0060 GROUP_BASE_NAME KF 0061 VERSION ${KF_VERSION} 0062 USE_VERSION_HEADER 0063 DEPRECATED_BASE_VERSION 0 0064 DEPRECATION_VERSIONS 0065 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} 0066 ) 0067 0068 set(kunitconversion_BUILD_INCLUDE_DIRS ${KUnitConversion_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) 0069 target_include_directories(KF6UnitConversion PUBLIC "$<BUILD_INTERFACE:${kunitconversion_BUILD_INCLUDE_DIRS}>") 0070 target_include_directories(KF6UnitConversion INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KUnitConversion>") 0071 0072 target_link_libraries(KF6UnitConversion PUBLIC Qt6::Core 0073 PRIVATE Qt6::Network 0074 KF6::I18n 0075 ) 0076 0077 ecm_generate_headers(KUnitConversion_CamelCase_HEADERS 0078 HEADER_NAMES 0079 Converter 0080 Value 0081 Unit 0082 UnitCategory 0083 0084 PREFIX KUnitConversion 0085 REQUIRED_HEADERS KUnitConversion_HEADERS 0086 ) 0087 install(FILES ${KUnitConversion_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KUnitConversion/KUnitConversion COMPONENT Devel) 0088 0089 install(TARGETS KF6UnitConversion EXPORT KF6UnitConversionTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS}) 0090 install(FILES 0091 ${CMAKE_CURRENT_BINARY_DIR}/kunitconversion/kunitconversion_export.h 0092 ${KUnitConversion_HEADERS} 0093 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KUnitConversion/kunitconversion COMPONENT Devel 0094 ) 0095 0096 ecm_qt_install_logging_categories( 0097 EXPORT KUNITCONVERSION 0098 FILE kunitconversion.categories 0099 DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} 0100 ) 0101 0102 if(BUILD_QCH) 0103 ecm_add_qch( 0104 KF6UnitConversion_QCH 0105 NAME KUnitConversion 0106 BASE_NAME KF6UnitConversion 0107 VERSION ${KF_VERSION} 0108 ORG_DOMAIN org.kde 0109 SOURCES # using only public headers, to cover only public API 0110 ${KUnitConversion_HEADERS} 0111 MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" 0112 LINK_QCHS 0113 Qt6Core_QCH 0114 INCLUDE_DIRS 0115 ${kunitconversion_BUILD_INCLUDE_DIRS} 0116 BLANK_MACROS 0117 KUNITCONVERSION_EXPORT 0118 KUNITCONVERSION_DEPRECATED 0119 KUNITCONVERSION_DEPRECATED_EXPORT 0120 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0121 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0122 COMPONENT Devel 0123 ) 0124 endif() 0125