Skip to content

[qcustomplot] find_package(qcustomplot CONFIG REQUIRED) error #50261

@yanzixiang

Description

@yanzixiang

Could not find a package configuration file provided by "qcustomplot" with
any of the following names:

qcustomplotConfig.cmake
qcustomplot-config.cmake

Add the installation prefix of "qcustomplot" to CMAKE_PREFIX_PATH or set
"qcustomplot_DIR" to a directory containing one of the above files. If
"qcustomplot" provides a separate development package or SDK, be sure it
has been installed.

Proposed solution

find_library(QCUSTOMPLOT_LIBRARY
NAMES qcustomplot2
PATHS "${VCPKG_INSTALLED_DIR}/../packages/qcustomplot_${VCPKG_TARGET_TRIPLET}/lib"
NO_DEFAULT_PATH
)

find_library(QCUSTOMPLOT_LIBRARY_DEBUG
NAMES qcustomplotd2
PATHS "${VCPKG_INSTALLED_DIR}/../packages/qcustomplot_${VCPKG_TARGET_TRIPLET}/debug/lib"
NO_DEFAULT_PATH
)

if (NOT QCUSTOMPLOT_INCLUDE_DIR OR NOT QCUSTOMPLOT_LIBRARY OR NOT QCUSTOMPLOT_LIBRARY_DEBUG)
message(FATAL_ERROR "Failed to find QCustomPlot! Check vcpkg installation.")
endif()

add_library(qcustomplot STATIC IMPORTED GLOBAL)
set_target_properties(qcustomplot PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${QCUSTOMPLOT_INCLUDE_DIR}"
IMPORTED_LOCATION "${QCUSTOMPLOT_LIBRARY}"
IMPORTED_LOCATION_DEBUG "${QCUSTOMPLOT_LIBRARY_DEBUG}"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions