Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/modules/hunter_download_cache_meta_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function(hunter_download_cache_meta_file)
hunter_get_passwords_path(pass_path)
string(COMPARE NOTEQUAL "${pass_path}" "" has_pass)

set(total_retry 10)
set(total_retry 1)
foreach(x RANGE ${total_retry})
foreach(server ${HUNTER_CACHE_SERVERS})
set(HUNTER_CACHE_SERVER_NAME "${server}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/hunter_download_cache_raw_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function(hunter_download_cache_raw_file)
hunter_get_passwords_path(pass_path)
string(COMPARE NOTEQUAL "${pass_path}" "" has_pass)

set(total_retry 10)
set(total_retry 1)
foreach(x RANGE ${total_retry})
foreach(server ${HUNTER_CACHE_SERVERS})
set(HUNTER_CACHE_SERVER_NAME "${server}")
Expand Down
11 changes: 11 additions & 0 deletions cmake/projects/BZip2/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ hunter_add_version(
9125bd674fbe7c8169c8ea6a2a15a414a7dc2f86
)

hunter_add_version(
PACKAGE_NAME
BZip2
VERSION
"1.0.8-p1"
URL
"https://github.com/regulaforensics/bzip2/archive/v1.0.8-p1.tar.gz"
SHA1
D3772F29147BDD034109E2B47242AE115ADF2E95
)

hunter_cmake_args(
BZip2
CMAKE_ARGS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ else()
hunter_fatal_error("TODO: set toolset for boost" ERROR_PAGE "error.boost.toolset")
endif()

hunter_dump_cmake_flags()
hunter_dump_cmake_flags(SKIP_DEPLOYMENT_TARGET)
# -> CMAKE_C_FLAGS
# -> CMAKE_CXX_FLAGS

Expand Down
11 changes: 11 additions & 0 deletions cmake/projects/OpenSSL/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,17 @@ hunter_add_version(
34ea65451f7fc4625f31ba50f89b3fbea12f13f3
)

hunter_add_version(
PACKAGE_NAME
OpenSSL
VERSION
"1.1.1w"
URL
"https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz"
SHA1
3409260b6a9bf19d10d253c670e5e7b3c7b3a90b
)

# 3.0 series (LTS)
hunter_add_version(
PACKAGE_NAME
Expand Down
226 changes: 127 additions & 99 deletions cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ hunter_assert_not_empty_string("@IOS_SDK_VERSION@")
hunter_assert_not_empty_string("@IPHONESIMULATOR_ROOT@")
hunter_assert_not_empty_string("@IPHONEOS_ROOT@")

hunter_dump_cmake_flags(SKIP_INCLUDES)
hunter_dump_cmake_flags(SKIP_INCLUDES SKIP_DEPLOYMENT_TARGET)
# -> CMAKE_CXX_FLAGS
# -> CMAKE_C_FLAGS

Expand All @@ -48,18 +48,34 @@ set(configure_opts threads no-shared)
# Pass C flags through
set(configure_opts ${configure_opts} ${CMAKE_C_FLAGS})

foreach(arch @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@)
list(
APPEND
ssl_input_libraries
"@HUNTER_PACKAGE_SOURCE_DIR@/${arch}/libssl.a"
)
list(
APPEND
crypto_input_libraries
"@HUNTER_PACKAGE_SOURCE_DIR@/${arch}/libcrypto.a"
)
endforeach()
list(APPEND iphoneos_archs @IPHONEOS_ARCHS@)
list(APPEND iphonesimulator_archs @IPHONESIMULATOR_ARCHS@)

macro(__setup_lipo_input _platform _archs)
message(STATUS "lipo ${_platform}-${_archs}")
foreach(arch IN ITEMS ${_archs})
list(
APPEND
ssl_input_libraries
"@HUNTER_PACKAGE_SOURCE_DIR@/${_platform}-${arch}/libssl.a"
)
list(
APPEND
crypto_input_libraries
"@HUNTER_PACKAGE_SOURCE_DIR@/${_platform}-${arch}/libcrypto.a"
)
message(STATUS " - lipo add ${_platform}-${arch}")
endforeach()
endmacro()

if(iphoneos_archs)
__setup_lipo_input(iphoneos "${iphoneos_archs}")
endif()

if(iphonesimulator_archs)
__setup_lipo_input(iphonesimulator "${iphonesimulator_archs}")
endif()


# fuse all libraries by 'lipo'
ExternalProject_Add(
Expand Down Expand Up @@ -93,89 +109,101 @@ ExternalProject_Add(
"@HUNTER_PACKAGE_INSTALL_PREFIX@/lib/libcrypto.a"
)

foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@)
set(iphoneos_archs @IPHONEOS_ARCHS@)
list(FIND iphoneos_archs ${variant} find_index)
if(find_index EQUAL -1)
set(CROSS_TOP "@IPHONESIMULATOR_ROOT@")
set(CROSS_SDK "iPhoneSimulator@IOS_SDK_VERSION@.sdk")
set(SDK_ROOT ${IPHONESIMULATOR_SDK_ROOT})
else()
set(CROSS_TOP "@IPHONEOS_ROOT@")
set(CROSS_SDK "iPhoneOS@IOS_SDK_VERSION@.sdk")
set(SDK_ROOT ${IPHONEOS_SDK_ROOT})
endif()

string(COMPARE EQUAL "${variant}" "arm" arm)
string(COMPARE EQUAL "${variant}" "armv7" armv7)
if(arm OR armv7)
set(target "ios-cross")
endif()

string(COMPARE EQUAL "${variant}" "arm64" ios64_cross)
if(ios64_cross)
set(target "ios64-cross")
endif()

string(COMPARE EQUAL "${variant}" "i386" i386)
if(i386)
set(target "darwin-i386-cc")
endif()

string(COMPARE EQUAL "${variant}" "x86_64" x86_64)
if(x86_64)
set(target "darwin64-x86_64-cc")
# set_key.c:398:17: error: unsupported inline asm:
# input with type 'unsigned long' matching output with type 'unsigned int'
set(configure_opts ${configure_opts} "no-asm")
endif()

ExternalProject_Add(
"@HUNTER_EP_NAME@-${variant}"
URL
@HUNTER_PACKAGE_URL@
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
"@HUNTER_PACKAGE_SOURCE_DIR@/${variant}"
INSTALL_DIR
"@HUNTER_PACKAGE_INSTALL_PREFIX@"
# not used, just avoid creating Install/<name> empty directory
CONFIGURE_COMMAND
./Configure
"${target}"
"${configure_opts}"
"no-async"
"--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@"
"--libdir=lib"
"-arch ${variant}"
"-isysroot ${SDK_ROOT}"
BUILD_COMMAND
. "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" &&
export CROSS_TOP=${CROSS_TOP} &&
export CROSS_SDK=${CROSS_SDK} &&
make
BUILD_IN_SOURCE
1
INSTALL_COMMAND
make install_sw
# installed libraries will be rewrited,
# other files are equal
COMMAND # Copy license files
"@CMAKE_COMMAND@"
"-C@HUNTER_ARGS_FILE@" # for 'HUNTER_INSTALL_LICENSE_FILES'
"-Dsrcdir=@HUNTER_PACKAGE_SOURCE_DIR@/${variant}"
"-Ddstdir=@HUNTER_PACKAGE_LICENSE_DIR@"
-P
"@HUNTER_SELF@/scripts/try-copy-license.cmake"
)

add_dependencies(
"@HUNTER_EP_NAME@-ios_universal"
"@HUNTER_EP_NAME@-${variant}"
)
endforeach()
macro(__setup_platform _platform _archs)
string(COMPARE EQUAL "${_platform}" "iphoneos" is_iphoneos)
string(COMPARE EQUAL "${_platform}" "iphonesimulator" is_iphonesimulator)
message(STATUS "platform ${_platform}-${_archs}")
foreach(arch IN ITEMS ${_archs})
if(_platform STREQUAL "iphoneos")
set(CROSS_TOP "@IPHONEOS_ROOT@")
set(CROSS_SDK "iPhoneOS@IOS_SDK_VERSION@.sdk")
elseif(_platform STREQUAL "iphonesimulator")
set(CROSS_TOP "@IPHONESIMULATOR_ROOT@")
set(CROSS_SDK "iPhoneSimulator@IOS_SDK_VERSION@.sdk")
endif()

if(arch MATCHES "arm|armv7")
set(target "ios-cross")
endif()

if(arch MATCHES "arm64")
set(target "iossimulator-xcrun")
endif()

if(arch MATCHES "i386")
set(target "darwin-i386-cc")
endif()

if(arch MATCHES "x86_64")
if(is_iphoneos)
set(target "darwin64-x86_64-cc")
else()
set(target "iossimulator-xcrun")
endif()
# set_key.c:398:17: error: unsupported inline asm:
# input with type 'unsigned long' matching output with type 'unsigned int'
set(configure_opts ${configure_opts} "no-asm")
endif()

ExternalProject_Add(
"@HUNTER_EP_NAME@-${_platform}-${arch}"
URL
@HUNTER_PACKAGE_URL@
URL_HASH
SHA1=@HUNTER_PACKAGE_SHA1@
DOWNLOAD_DIR
"@HUNTER_PACKAGE_DOWNLOAD_DIR@"
TLS_VERIFY
"@HUNTER_TLS_VERIFY@"
SOURCE_DIR
"@HUNTER_PACKAGE_SOURCE_DIR@/${_platform}-${arch}"
INSTALL_DIR
"@HUNTER_PACKAGE_INSTALL_PREFIX@"
# not used, just avoid creating Install/<name> empty directory
CONFIGURE_COMMAND
./Configure
"${target}"
"${configure_opts}"
"no-async"
"--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@"
"--libdir=lib"
"-arch ${arch}"
"-isysroot ${CMAKE_OSX_SYSROOT}"
BUILD_COMMAND
. "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" &&
export CROSS_TOP=${CROSS_TOP} &&
export CROSS_SDK=${CROSS_SDK} &&
make
BUILD_IN_SOURCE
1
INSTALL_COMMAND
make install_sw
# installed libraries will be rewrited,
# other files are equal
COMMAND # Copy license files
"@CMAKE_COMMAND@"
"-C@HUNTER_ARGS_FILE@" # for 'HUNTER_INSTALL_LICENSE_FILES'
"-Dsrcdir=@HUNTER_PACKAGE_SOURCE_DIR@/${_platform}-${arch}"
"-Ddstdir=@HUNTER_PACKAGE_LICENSE_DIR@"
-P
"@HUNTER_SELF@/scripts/try-copy-license.cmake"
)

add_dependencies(
"@HUNTER_EP_NAME@-ios_universal"
"@HUNTER_EP_NAME@-${_platform}-${arch}"
)

message(STATUS " - build add ${_platform}-${arch}")
endforeach()
endmacro()


if(iphoneos_archs)
__setup_platform(iphoneos "${iphoneos_archs}")
endif()

if(iphonesimulator_archs)
__setup_platform(iphonesimulator "${iphonesimulator_archs}")
endif()

11 changes: 11 additions & 0 deletions cmake/projects/freetype/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
freetype
VERSION
"2.9.1-p4"
URL
"https://github.com/regulaforensics/freetype/archive/v2.9.1-p4.tar.gz"
SHA1
2409311388E54EC839C3E9BEF0EC62C748D1F810
)

hunter_add_version(
PACKAGE_NAME
freetype
Expand Down
11 changes: 11 additions & 0 deletions cmake/projects/jsoncpp/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ include(hunter_cmake_args)

# List of versions:

hunter_add_version(
PACKAGE_NAME
jsoncpp
VERSION
"1.9.6"
URL
"https://github.com/open-source-parsers/jsoncpp/archive/1.9.6.tar.gz"
SHA1
fb695d42da4a60e1d25d0757eff8308827f07240
)

hunter_add_version(
PACKAGE_NAME
jsoncpp
Expand Down
Loading