include dir doesn't get expanded with install_dir effectively rendering the include dir variables broken if(NOT POLKITQT-1_INSTALL_DIR) set(POLKITQT-1_INSTALL_DIR "/opt/project-neon5") endif(NOT POLKITQT-1_INSTALL_DIR) set(POLKITQT-1_INCLUDE_DIR "include/polkit-qt5-1") set(POLKITQT-1_INCLUDE_DIRS "${POLKITQT-1_INCLUDE_DIR}") will result in a path relative to the source directory of a project using the config for example: cd /home/me/src/git/k/libqapt/build/src/worker && /usr/bin/c++ -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_BSD_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -std=c++0x -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -fexceptions -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline -fPIE -I/home/me/src/git/k/libqapt/build/src/worker -I/home/me/src/git/k/libqapt/src/worker -I/home/me/src/git/k/libqapt -I/home/me/src/git/k/libqapt/build -I/home/me/src/git/k/libqapt/src/worker/include/polkit-qt5-1 -I/home/me/src/git/k/libqapt/src -I/home/me/src/git/k/libqapt/src/.. -I/home/me/src/git/k/libqapt/build/src/.. -I/home/me/src/git/k/libqapt/build/src -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -o CMakeFiles/qaptworker2.dir/transaction.cpp.o -c /home/me/src/git/k/libqapt/src/worker/transaction.cpp Reproducible: Always