From 2680321860e96cd015ce74c9f8cbe7477b4948b5 Mon Sep 17 00:00:00 2001 From: CoDEmanX Date: Fri, 2 Sep 2016 16:40:58 +0200 Subject: [PATCH] CMake: Warn if empty QTDIR/DepsPath vars on Windows Closes jp9000/obs-studio#608 --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fafd69818..14cb5c39f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,21 @@ cmake_minimum_required(VERSION 2.8.12) project(obs-studio) +if(WIN32) + if (QTDIR OR DEFINED ENV{QTDIR} OR DEFINED ENV{QTDIR32} OR DEFINED ENV{QTDIR64}) + # Qt path set by user or env var + else() + set(QTDIR "" CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)") + message(WARNING "QTDIR variable is missing. Please set this variable to specify path to Qt (e.g. C:/Qt/5.7/msvc2015_64)") + endif() + if (DepsPath OR DEFINED ENV{DepsPath} OR DEFINED ENV{DepsPath32} OR DEFINED ENV{DepsPath64}) + # Dependencies path set by user or env var + else() + set(DepsPath "" CACHE PATH "Path to compiled dependencies (e.g. D:/dependencies/win64)") + message(WARNING "DepsPath variable is missing. Please set this variable to specify path to compiled dependencies (e.g. D:/dependencies/win64)") + endif() +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") include(ObsHelpers)