Skip to content

Commit b457c03

Browse files
committed
chore: refactor core cmakelists dependency
Log: Change-Id: Idb7407697c0280e6a04919ff29b661dd7d24ca93
1 parent 6f7e93b commit b457c03

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/plugins/core/CMakeLists.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ project(core)
44

55
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips64")
66
add_definitions(-DUNSUPPORTPLATFORM)
7+
message(STATUS "Skipping WebEngineWidgets for mips64 platform.")
8+
else()
9+
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WebEngineWidgets REQUIRED)
10+
target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::WebEngineWidgets)
711
endif()
812

913
FILE(GLOB_RECURSE PROJECT_SOURCES
@@ -30,12 +34,4 @@ target_link_libraries(${PROJECT_NAME}
3034
${DtkWidget_LIBRARIES}
3135
)
3236

33-
if(NOT ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "loongarch64")
34-
# loogarch not support web engine now, maybe remove this condition later.
35-
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WebEngineWidgets REQUIRED)
36-
target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::WebEngineWidgets)
37-
else()
38-
message(STATUS "Skipping WebEngineWidgets for loongarch64 platform.")
39-
endif()
40-
4137
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})

0 commit comments

Comments
 (0)