I'm currently working on a project where Qt5Charts is used in a linux platform. By default there was qt5.5 in the system. I have installed qt5.8 in my home directory.
To build the project I'm using cmake. My Cmakefile looks something like this
find_package(Qt5Widgets)
set(CMAKE_AUTOMOC ON)
if(Qt5Widgets_FOUND)
set( QT_INCLUDE_DIR
${Qt5Widgets_INCLUDE_DIRS}
)
include_directories( ${QT_INCLUDE_DIR} )
set (LIBS ${LIBS} ${Qt5Widgets_LIBRARIES} )
endif()
find_package(Qt5Charts)
if(Qt5Charts_FOUND)
set( QT_INCLUDE_DIR
${Qt5Charts_INCLUDE_DIRS}
)
include_directories( ${QT_INCLUDE_DIR} )
set (LIBS ${LIBS} ${Qt5Charts_LIBRARIES} )
endif()
But the cmake is not been able to find Qt5Charts as it is only available in Qt5.8. The Qt5Widgets is successfully found as it is available in Qt5.5 also.
For Qt5Charts it says
Could not find a package configuration file provided by "Qt5Charts" with any of the following names: Qt5ChartsConfig.cmake qt5charts-config.cmake
Is there a way that I tell cmake to look for packages of Qt5.8 instead of Qt5.5? Or is there a way to specify the default path to look for?
Qt/5.8/gcc_64/lib/cmake is the location of cmakeFiles for 5.8 /usr/lib/x86_64-linux-gnu/cmake for 5.5