From a8ae2156d9b2f6d810445cfdd77bb48648311b44 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 24 Apr 2021 17:12:40 -0600 Subject: [PATCH] fix build errors --- CMakeLists.txt | 5 +++++ cmake/QtUtils.cmake | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a955bfa..7c601c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 3.16) project(Textractor) + +if (NOT MSVC) + message(FATAL_ERROR "Textractor can only be built with Visual Studio") +endif() + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) add_compile_options( diff --git a/cmake/QtUtils.cmake b/cmake/QtUtils.cmake index fc92c6e..0cf9875 100644 --- a/cmake/QtUtils.cmake +++ b/cmake/QtUtils.cmake @@ -1,5 +1,5 @@ macro(msvc_registry_search) - if(NOT EXISTS Qt5_DIR AND MSVC) + if(NOT DEFINED Qt5_DIR) # look for user-registry pointing to qtcreator get_filename_component(QT_BIN [HKEY_CURRENT_USER\\Software\\Classes\\Applications\\QtProject.QtCreator.pro\\shell\\Open\\Command] PATH)