Fix osx deployment target and sysroot propagation in the qt toolchain
We need to save them in the toolchain file, otherwise we can't compile anything :) Change-Id: Ic5c53524fa4aa05d0b3229c2905dff92ca437ec1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
This commit is contained in:
parent
8c60782124
commit
1a8799bfdd
@ -78,7 +78,17 @@ if(VCPKG_TARGET_TRIPLET)
|
||||
list(APPEND init_vcpkg "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
list(APPEND init_platform "set(CMAKE_OSX_SYSROOT \"${CMAKE_OSX_SYSROOT}\" CACHE PATH \"\")")
|
||||
endif()
|
||||
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
list(APPEND init_platform "set(CMAKE_OSX_DEPLOYMENT_TARGET \"${CMAKE_OSX_DEPLOYMENT_TARGET}\" CACHE STRING \"\")")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" init_vcpkg "${init_vcpkg}")
|
||||
string(REPLACE ";" "\n" init_platform "${init_platform}")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/qt.toolchain.cmake.in" "${__GlobalConfig_build_dir}/qt.toolchain.cmake" @ONLY)
|
||||
qt_install(FILES "${__GlobalConfig_build_dir}/qt.toolchain.cmake" DESTINATION "${__GlobalConfig_install_dir}" COMPONENT Devel)
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
list(APPEND CMAKE_PREFIX_PATH "@CMAKE_INSTALL_PREFIX@")
|
||||
list(APPEND CMAKE_FIND_ROOT_PATH "@CMAKE_INSTALL_PREFIX@")
|
||||
|
||||
@init_platform@
|
||||
|
||||
@init_qt_host_path@
|
||||
|
||||
@init_original_toolchain_file@
|
||||
|
Loading…
x
Reference in New Issue
Block a user