chore: split cmake into multiple files and fix settings searching regex + add enabled option to llm
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Failing after 17s
JS/TS / lint (pull_request) Successful in 19s
Python / static (pull_request) Successful in 1m11s
Rust / fmt (pull_request) Successful in 1m3s
Rust / build (pull_request) Successful in 2m26s
Rust / clippy (pull_request) Failing after 16m40s
Python / verify (pull_request) Failing after 17m52s
C++ / clang-tidy (pull_request) Failing after 18m0s
C++ / build (pull_request) Failing after 18m2s
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Failing after 17s
JS/TS / lint (pull_request) Successful in 19s
Python / static (pull_request) Successful in 1m11s
Rust / fmt (pull_request) Successful in 1m3s
Rust / build (pull_request) Successful in 2m26s
Rust / clippy (pull_request) Failing after 16m40s
Python / verify (pull_request) Failing after 17m52s
C++ / clang-tidy (pull_request) Failing after 18m0s
C++ / build (pull_request) Failing after 18m2s
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
add_library(zshell-pch INTERFACE)
|
||||
target_precompile_headers(zshell-pch INTERFACE
|
||||
<qobject.h>
|
||||
<qqmlintegration.h>
|
||||
<qstring.h>
|
||||
<qqmlengine.h>
|
||||
<qloggingcategory.h>
|
||||
<qvariant.h>
|
||||
<qtimer.h>
|
||||
<qdir.h>
|
||||
<qlist.h>
|
||||
<qstringlist.h>
|
||||
<qpointer.h>
|
||||
)
|
||||
@@ -0,0 +1,45 @@
|
||||
message(STATUS "QML install dir: ${CMAKE_INSTALL_PREFIX}/${INSTALL_QMLDIR}")
|
||||
|
||||
function(qml_module arg_TARGET)
|
||||
cmake_parse_arguments(PARSE_ARGV 1 arg "" "URI" "SOURCES;QML_FILES;QML_SINGLETONS;DEPENDENCIES;IMPORTS;OPTIONAL_IMPORTS;DEFAULT_IMPORTS;LIBRARIES")
|
||||
qt_add_qml_module(${arg_TARGET}
|
||||
URI ${arg_URI}
|
||||
SOURCES ${arg_SOURCES}
|
||||
QML_FILES ${arg_QML_FILES} ${arg_QML_SINGLETONS}
|
||||
DEPENDENCIES ${arg_DEPENDENCIES}
|
||||
IMPORTS ${arg_IMPORTS}
|
||||
OPTIONAL_IMPORTS ${arg_OPTIONAL_IMPORTS}
|
||||
DEFAULT_IMPORTS ${arg_DEFAULT_IMPORTS}
|
||||
)
|
||||
|
||||
qt_query_qml_module(${arg_TARGET}
|
||||
URI module_uri
|
||||
PLUGIN_TARGET module_plugin_target
|
||||
TARGET_PATH module_target_path
|
||||
QMLDIR module_qmldir
|
||||
TYPEINFO module_typeinfo
|
||||
)
|
||||
|
||||
message(STATUS "Created QML module: ${module_uri}")
|
||||
|
||||
string(REPLACE "/" ";" uri_parts "${module_target_path}")
|
||||
list(GET uri_parts 0 top_level)
|
||||
set(backing_lib_dir "${INSTALL_QMLDIR}/${top_level}/lib")
|
||||
set(module_dir "${INSTALL_QMLDIR}/${module_target_path}")
|
||||
|
||||
install(TARGETS ${arg_TARGET}
|
||||
LIBRARY DESTINATION "${backing_lib_dir}"
|
||||
RUNTIME DESTINATION "${backing_lib_dir}"
|
||||
)
|
||||
install(TARGETS "${module_plugin_target}"
|
||||
LIBRARY DESTINATION "${module_dir}"
|
||||
RUNTIME DESTINATION "${module_dir}"
|
||||
)
|
||||
install(FILES "${module_qmldir}" DESTINATION "${module_dir}")
|
||||
install(FILES "${module_typeinfo}" DESTINATION "${module_dir}")
|
||||
|
||||
target_link_libraries(${arg_TARGET} PRIVATE Qt::Core Qt::Qml ${arg_LIBRARIES})
|
||||
|
||||
file(RELATIVE_PATH plugin_to_lib "/${module_target_path}" "/${top_level}/lib")
|
||||
set_property(TARGET ${module_plugin_target} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/${plugin_to_lib}")
|
||||
endfunction()
|
||||
@@ -0,0 +1,10 @@
|
||||
find_library(SENSORS_LIBRARY NAMES sensors REQUIRED)
|
||||
find_path(SENSORS_INCLUDE_DIR NAMES sensors/sensors.h REQUIRED)
|
||||
if(NOT TARGET Sensors::Sensors)
|
||||
add_library(Sensors::Sensors UNKNOWN IMPORTED)
|
||||
set_target_properties(Sensors::Sensors PROPERTIES
|
||||
IMPORTED_LOCATION "${SENSORS_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SENSORS_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user