Skip to content

Commit

Permalink
Fix: remove the CMAKE_OSX_DEPLOYMENT_TARGET auto detect by CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
ErniGH committed Mar 13, 2024
1 parent 2022a2a commit 9d3e483
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function(detect_os OS OS_API_LEVEL OS_SDK OS_SUBSYSTEM OS_VERSION)
message(STATUS "CMake-Conan: cmake_osx_sysroot=${CMAKE_OSX_SYSROOT}")
set(${OS_SDK} ${_OS_SDK} PARENT_SCOPE)
endif()
if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
if(DEFINED CONAN_CUSTOM_CMAKE_OSX_DEPLOYMENT_TARGET)
message(STATUS "CMake-Conan: cmake_osx_deployment_target=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(${OS_VERSION} ${CMAKE_OSX_DEPLOYMENT_TARGET} PARENT_SCOPE)
endif()
Expand Down Expand Up @@ -620,6 +620,10 @@ set(CONAN_HOST_PROFILE "default;auto-cmake" CACHE STRING "Conan host profile")
set(CONAN_BUILD_PROFILE "default" CACHE STRING "Conan build profile")
set(CONAN_INSTALL_ARGS "--build=missing" CACHE STRING "Command line arguments for conan install")

if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
set(CONAN_CUSTOM_CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_DEPLOYMENT_TARGET)
endif ()

find_program(_cmake_program NAMES cmake NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
if(NOT _cmake_program)
get_filename_component(PATH_TO_CMAKE_BIN "${CMAKE_COMMAND}" DIRECTORY)
Expand Down

0 comments on commit 9d3e483

Please sign in to comment.