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

0001 ecm_setup_version(PROJECT
0002     VARIABLE_PREFIX KIROGI
0003     PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KirogiCoreConfigVersion.cmake"
0004     SOVERSION ${KIROGI_VERSION_STRING}
0005 )
0006 
0007 set(kirogicore_SRCS
0008     abstractvehicle.cpp
0009     abstractconnection.cpp
0010     abstractpluginmodel.cpp
0011     vehiclesupportplugin.cpp
0012     vehiclesupportpluginmodel.cpp
0013     connectionconfiguration.cpp
0014     udpconfiguration.cpp
0015 )
0016 
0017 ecm_qt_declare_logging_category(kirogicore_SRCS
0018     HEADER debug.h
0019     IDENTIFIER KIROGI_CORE
0020     CATEGORY_NAME "kirogi.core"
0021 )
0022 
0023 ecm_generate_headers(Kirogi_CamelCase_HEADERS
0024     HEADER_NAMES
0025         AbstractVehicle
0026         AbstractConnection
0027         AbstractPluginModel
0028         VehicleSupportPlugin
0029         VehicleSupportPluginModel
0030         ConnectionConfiguration
0031         UdpConfiguration
0032     REQUIRED_HEADERS Kirogi_HEADERS
0033     PREFIX kirogi
0034 )
0035 
0036 add_subdirectory(positionsource)
0037 add_subdirectory(settings)
0038 add_subdirectory(vehicleparameters)
0039 
0040 add_library(kirogicore SHARED ${kirogicore_SRCS} ${Kirogi_HEADERS})
0041 add_library(KirogiCore ALIAS kirogicore)
0042 
0043 generate_export_header(kirogicore
0044     BASE_NAME Kirogi
0045     EXPORT_FILE_NAME kirogicore_export.h)
0046 
0047 target_include_directories(kirogicore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/kirogi>")
0048 
0049 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
0050     target_compile_options(kirogicore PRIVATE
0051         -pedantic
0052         -Woverloaded-virtual
0053         -Wunused
0054         -Wall
0055         -Wextra
0056         -Wshadow
0057         -Wnon-virtual-dtor
0058         -Wold-style-cast
0059     )
0060 
0061     if(CMAKE_COMPILER_IS_GNUCXX)
0062         target_compile_options(kirogicore PRIVATE
0063             -Wduplicated-cond
0064             -Wduplicated-branches
0065             -Wlogical-op
0066             -Wnull-dereference
0067             -fsanitize=leak
0068         )
0069     endif()
0070 endif()
0071 
0072 target_link_libraries(kirogicore
0073     PRIVATE
0074         Qt5::Core
0075         Qt5::Positioning
0076         Qt5::Qml
0077         Qt5::Quick
0078         KF5::CoreAddons
0079 
0080         positionsource
0081         settings
0082         vehicleparameters
0083 )
0084 
0085 set_target_properties(kirogicore
0086     PROPERTIES
0087     VERSION ${KIROGI_VERSION_STRING}
0088     SOVERSION ${KIROGI_SOVERSION}
0089     EXPORT_NAME KirogiCore
0090     OUTPUT_NAME kirogicore
0091 )
0092 
0093 install(TARGETS kirogicore EXPORT kirogicoreLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0094 
0095 install(FILES
0096         ${Kirogi_HEADERS}
0097         ${CMAKE_CURRENT_BINARY_DIR}/kirogicore_export.h
0098         DESTINATION ${KDE_INSTALL_INCLUDEDIR}/Kirogi/kirogi COMPONENT Devel)
0099 
0100 install(FILES
0101         ${Kirogi_CamelCase_HEADERS}
0102         DESTINATION ${KDE_INSTALL_INCLUDEDIR}/Kirogi/Kirogi COMPONENT Devel)
0103 
0104 write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/KirogiCoreConfigVersion.cmake
0105     VERSION "${PROJECT_VERSION}"
0106     COMPATIBILITY AnyNewerVersion)
0107 
0108 set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_LIBDIR}/cmake/KirogiCore)
0109 
0110 configure_package_config_file(KirogiCoreConfig.cmake.in
0111     "${CMAKE_CURRENT_BINARY_DIR}/KirogiCoreConfig.cmake"
0112     INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR})
0113 
0114 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KirogiCoreConfig.cmake
0115               ${CMAKE_CURRENT_BINARY_DIR}/KirogiCoreConfigVersion.cmake
0116         DESTINATION ${CMAKECONFIG_INSTALL_DIR})
0117 
0118 install(EXPORT kirogicoreLibraryTargets
0119         DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0120         FILE KirogiCoreLibraryTargets.cmake)
0121 
0122 install(FILES kirogi.categories DESTINATION ${KDE_INSTALL_CONFDIR})
0123 
0124 if(NOT BUILD_QT_QUICK_LIB)
0125     return()
0126 endif()
0127 
0128 add_library(kirogiqtquickplugin SHARED qtquickplugin.cpp)
0129 
0130 target_link_libraries(kirogiqtquickplugin
0131     Qt5::Positioning
0132     Qt5::Qml
0133     Qt5::Quick
0134     KF5::CoreAddons
0135 
0136     KirogiCore
0137     positionsource
0138     settings
0139     vehicleparameters
0140     )
0141 
0142 install(TARGETS kirogiqtquickplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirogi)
0143 install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirogi)