forked from qt-creator/qt-creator
CMakePM: auto-setup.cmake do not fail if QtCreator.ini doesn't exist
There are Qt Creator installations that do not provide "QtProject/QtCreator.ini" file, and without it the auto-setup.cmake code would fail. Task-number: QTBUG-99273 Change-Id: I7674f68bc89375d8065d820b89650a358a7226b2 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -33,6 +33,7 @@ macro(qtc_auto_setup_conan)
|
|||||||
|
|
||||||
# Get conan from Qt SDK
|
# Get conan from Qt SDK
|
||||||
set(qt_creator_ini "${CMAKE_CURRENT_LIST_DIR}/../QtProject/QtCreator.ini")
|
set(qt_creator_ini "${CMAKE_CURRENT_LIST_DIR}/../QtProject/QtCreator.ini")
|
||||||
|
if (EXISTS ${qt_creator_ini})
|
||||||
file(STRINGS ${qt_creator_ini} install_settings REGEX "^InstallSettings=.*$")
|
file(STRINGS ${qt_creator_ini} install_settings REGEX "^InstallSettings=.*$")
|
||||||
if (install_settings)
|
if (install_settings)
|
||||||
string(REPLACE "InstallSettings=" "" install_settings "${install_settings}")
|
string(REPLACE "InstallSettings=" "" install_settings "${install_settings}")
|
||||||
@@ -46,6 +47,7 @@ macro(qtc_auto_setup_conan)
|
|||||||
file(TO_CMAKE_PATH "${conan_executable}" conan_executable)
|
file(TO_CMAKE_PATH "${conan_executable}" conan_executable)
|
||||||
get_filename_component(conan_path "${conan_executable}" DIRECTORY)
|
get_filename_component(conan_path "${conan_executable}" DIRECTORY)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(path_sepparator ":")
|
set(path_sepparator ":")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
Reference in New Issue
Block a user