Skip to content

Commit

Permalink
Match OSX_DEPLOYMENT_TARGET
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Sep 9, 2023
1 parent 1601099 commit 3760e98
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 30 deletions.
43 changes: 18 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ if (WIN32)
elseif (LINUX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
elseif (APPLE)
# if(${APNGASM_COMPILE_TARGET} STREQUAL "x86_64")
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
# endif()
if(${APNGASM_COMPILE_TARGET} STREQUAL "x86_64")
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
endif()
endif()

set(ZLIB_USE_STATIC_LIBS ON)
Expand All @@ -44,28 +46,19 @@ endif()

# Add conan packages
if ("${APNGASM_COMPILE_TARGET}" STREQUAL "universal2")
set(CONAN_ROOT_X64 ${CMAKE_SOURCE_DIR}/conan_output/x86_64/direct_deploy)
set(CONAN_ROOT_ARM ${CMAKE_SOURCE_DIR}/conan_output/armv8/direct_deploy)

list(PREPEND CMAKE_PREFIX_PATH
${CONAN_ROOT_X64}
${CONAN_ROOT_ARM})

list(PREPEND CMAKE_LIBRARY_PATH
${CONAN_ROOT_X64}/libpng/lib
${CONAN_ROOT_ARM}/libpng/lib
${CONAN_ROOT_X64}/boost/lib
${CONAN_ROOT_ARM}/boost/lib
${CONAN_ROOT_X64}/zlib/lib
${CONAN_ROOT_ARM}/zlib/lib)

list(PREPEND CMAKE_INCLUDE_PATH
${CONAN_ROOT_X64}/libpng/include
${CONAN_ROOT_ARM}/libpng/include
${CONAN_ROOT_X64}/boost/include
${CONAN_ROOT_ARM}/boost/include
${CONAN_ROOT_X64}/zlib/include
${CONAN_ROOT_ARM}/zlib/include)
set(CONAN_TOOLCHAIN_1 ${CMAKE_SOURCE_DIR}/conan_output/armv8/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN_1})
include(${CONAN_TOOLCHAIN_1})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN_1}")
endif()

set(CONAN_TOOLCHAIN_2 ${CMAKE_SOURCE_DIR}/conan_output/x86_64/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN_2})
include(${CONAN_TOOLCHAIN_2})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN_2}")
endif()
else()
set(CONAN_TOOLCHAIN ${CMAKE_SOURCE_DIR}/conan_output/${APNGASM_COMPILE_TARGET}/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN})
Expand Down
10 changes: 5 additions & 5 deletions get_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def install_deps(arch):
settings.append('os=Windows')
elif platform.system() == 'Darwin':
settings.append('os=Macos')
if arch == 'x86_64':
settings.append('os.version=10.15')
else:
settings.append('os.version=11.0')
settings.append('compiler=apple-clang')
# if arch == 'armv8':
settings.append('compiler.version=11.0')
# else:
# settings.append('compiler.version=10.15')
settings.append('compiler.libcxx=libc++')
elif platform.system() == 'Linux':
settings.append('os=Linux')
Expand Down Expand Up @@ -52,7 +52,7 @@ def install_deps(arch):
'conan', 'install',
*[x for s in settings for x in ('-s', s)],
*[x for b in build for x in ('-b', b)],
'-of', conan_output, '--deployer=direct_deploy', '.'
'-of', conan_output, '--deployer=full_deploy', '.'
])

return conan_output
Expand Down

0 comments on commit 3760e98

Please sign in to comment.