diff --git a/CMakeLists.txt b/CMakeLists.txt index a955bfae..7c601c07 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 fc92c6e5..0cf9875a 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)