linux: improve configure log

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-12-28 11:33:24 +08:00
parent a5586604e9
commit 4a903a5805
1 changed files with 13 additions and 3 deletions

View File

@ -29,11 +29,21 @@ if(UNIX AND NOT APPLE)
find_package(Qt5 QUIET COMPONENTS X11Extras) find_package(Qt5 QUIET COMPONENTS X11Extras)
endif() endif()
endif() endif()
find_package(X11 QUIET) find_package(X11 QUIET COMPONENTS xcb)
if(TARGET X11::xcb)
message("Found system XCB. The XCB wrapper will be disabled.")
else()
message("System XCB not found. The XCB wrapper will be used instead.")
endif()
find_package(PkgConfig QUIET) find_package(PkgConfig QUIET)
if(PkgConfig_FOUND) if(PkgConfig_FOUND)
pkg_check_modules(GTK3 QUIET IMPORTED_TARGET gtk+-3.0) pkg_check_modules(GTK3 QUIET IMPORTED_TARGET gtk+-3.0)
endif() endif()
if(TARGET PkgConfig::GTK3)
message("Found system GTK. The GTK wrapper will be disabled.")
else()
message("System GTK not found. The GTK wrapper will be used instead.")
endif()
endif() endif()
set(SUB_MOD_NAME Core) set(SUB_MOD_NAME Core)
@ -193,12 +203,12 @@ if(APPLE)
"-framework AppKit" "-framework AppKit"
) )
elseif(UNIX) elseif(UNIX)
if(X11_FOUND) if(TARGET X11::xcb)
target_link_libraries(${SUB_PROJ_NAME} PRIVATE target_link_libraries(${SUB_PROJ_NAME} PRIVATE
X11::xcb X11::xcb
) )
endif() endif()
if(GTK3_FOUND) if(TARGET PkgConfig::GTK3)
target_link_libraries(${SUB_PROJ_NAME} PRIVATE target_link_libraries(${SUB_PROJ_NAME} PRIVATE
PkgConfig::GTK3 PkgConfig::GTK3
) )