|
| 1 | +# Try to find qdeclarative6-boostable |
| 2 | +# Once done this will define |
| 3 | +# MAPPLAUNCHERD_QT6_FOUND - System has qdeclarative |
| 4 | +# MAPPLAUNCHERD_QT6_INCLUDE_DIRS - The qdeclarative include directories |
| 5 | +# MAPPLAUNCHERD_QT6_LIBRARIES - The libraries needed to use qdeclarative |
| 6 | +# MAPPLAUNCHERD_QT6_DEFINITIONS - Compiler switches required for using qdeclarative |
| 7 | + |
| 8 | +find_package(PkgConfig REQUIRED) |
| 9 | +pkg_check_modules(PC_Mapplauncherd_qt6 QUIET qdeclarative6-boostable) |
| 10 | +set(Mapplauncherd_qt6_DEFINITIONS ${PC_Mapplauncherd_qt6_CFLAGS_OTHER}) |
| 11 | + |
| 12 | +find_path(Mapplauncherd_qt6_INCLUDE_DIRS |
| 13 | + NAMES mdeclarativecache.h |
| 14 | + PATH_SUFFIXES mdeclarativecache6 |
| 15 | + PATHS ${PC_Mapplauncherd_qt6_INCLUDEDIR} ${PC_Mapplauncherd_qt6_INCLUDE_DIRS}) |
| 16 | + |
| 17 | +find_library(Mapplauncherd_qt6_LIBRARIES |
| 18 | + NAMES mdeclarativecache6 |
| 19 | + PATHS ${PC_Mapplauncherd_qt6_LIBDIR} ${PC_Mapplauncherd_qt6_LIBRARY_DIRS}) |
| 20 | + |
| 21 | +set(Mapplauncherd_qt6_VERSION ${PC_Mapplauncherd_qt6_VERSION}) |
| 22 | + |
| 23 | +include(FindPackageHandleStandardArgs) |
| 24 | +find_package_handle_standard_args(Mapplauncherd_qt6 |
| 25 | + FOUND_VAR |
| 26 | + Mapplauncherd_qt6_FOUND |
| 27 | + REQUIRED_VARS |
| 28 | + Mapplauncherd_qt6_LIBRARIES |
| 29 | + Mapplauncherd_qt6_INCLUDE_DIRS |
| 30 | + VERSION_VAR |
| 31 | + Mapplauncherd_qt6_VERSION) |
| 32 | + |
| 33 | +mark_as_advanced(Mapplauncherd_qt6_INCLUDE_DIR Mapplauncherd_qt6_LIBRARY Mapplauncherd_qt6_VERSION) |
| 34 | + |
| 35 | +if(Mapplauncherd_qt6_FOUND AND NOT TARGET Mapplauncherd_qt6::Mapplauncherd_qt6) |
| 36 | + add_library(Mapplauncherd_qt6::Mapplauncherd_qt6 UNKNOWN IMPORTED) |
| 37 | + set_target_properties(Mapplauncherd_qt6::Mapplauncherd_qt6 PROPERTIES |
| 38 | + IMPORTED_LOCATION "${Mapplauncherd_qt6_LIBRARIES}" |
| 39 | + INTERFACE_INCLUDE_DIRECTORIES "${Mapplauncherd_qt6_INCLUDE_DIRS}") |
| 40 | +endif() |
0 commit comments