-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
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}"
)