Re: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-20 Thread Alexander Stein
On Tuesday 08 March 2016, 10:00:00 wrote Nicholas Braden: > Jakob, I don't think there is any confusion about what REQUIRED means. > Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS > should not be required under any circumstances. The example error > message seems pretty clear

[CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-04 Thread Alexander Stein
Hi, I want to use some required Qt component while others are optional. Apparently if you specify REQUIRED in find_package OPTIONAL_COMPONENTS is ignored. Here is a minimal CMakeLists.txt: project(test) cmake_minimum_required(VERSION 3.5) find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui OPTIONA