Files
monero_c/contrib/depends/toolchain.cmake.in

210 lines
6.5 KiB
CMake
Raw Normal View History

cleanup patches (and other stuff) (#79) * cleanup patches * fix polyseed patch * Fix iOS builds * fix polyseed dependencies * fix polyseed patch for macOS * update ledger patch * update wownero patches and version * update checksums * wip" * update gitmodules * update boost build script * update build_single.sh * vix verbosey_copy * fix __clear_cache bug on wownero * update randomwow * migrate build system * fix cross compilation issues * some more build issue * update polyseed * cleanup cmakelists * fix toolchain.cmake.in * add ssp * another attempt at building windows on CI * fix package name * migrate mirror to my own hosting * change download mirror priority (fallback first) * link ssp in monero module as well by using CMAKE_{C,CXX}_FLAGS * fix android builds * update polyseed source * 13 -> trixie * fix package name conflicts, update runner to sid * update boost to 1_84_0, disable patch that's no longer needed * switch to ubuntu:24.04 * add POLYSEED_STATIC to toolchain.cmake.in in order to properly link * drop patches * fixes to darwin * link missing wowner-seed library * a litte bit more of experiments * build locale only on windows * update iconv * update definitions * update ci builds * update my progress * ios fix, update depends, ci * multithread build system * fix android, mingw and linux build issues * remove dependency check * update Dockerfile to include pigz * show a message when pigz is missing * fix devcontainer mingw setup (missing ENV) * update android build runner * sailfishos dropped (you better go behave yourself and run actual linux programs) * fiz pigz issues * install llvm-ranlib for android * fix iOS build issues * fix dummy ledger patch * fix macos and darwin * fix macos ci * fix macos build command * install autoconf * add automake * add libtool * macos fixes, wownero fixes, idk what else, please help me * fix wownero iOS build * Cleanup patches * add try-catch into monero code * fix error handling * update checksums
2024-12-04 10:22:48 -05:00
cmake_minimum_required(VERSION 3.13) # Ensure CMake version supports CMP0077
cmake_policy(SET CMP0077 NEW) # Ensure 'option' honors normal variables
# Set the system name to one of Android, Darwin, iOS, FreeBSD, Linux, or Windows
SET(CMAKE_SYSTEM_NAME @depends@)
SET(CMAKE_SYSTEM_PROCESSOR @arch@)
SET(CMAKE_BUILD_TYPE @release_type@)
OPTION(STATIC "Link libraries statically" ON)
OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
OPTION(BUILD_TESTS "Build tests." OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
SET(STATIC ON)
SET(UNBOUND_STATIC ON)
SET(ARCH "default")
SET(BUILD_TESTS @build_tests@)
SET(TREZOR_DEBUG @build_tests@)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH @prefix@ /usr)
SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
SET(Readline_ROOT_DIR @prefix@)
SET(Readline_INCLUDE_DIR @prefix@/include)
SET(Readline_LIBRARY @prefix@/lib/libreadline.a)
SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
SET(UNBOUND_INCLUDE_DIR @prefix@/include)
SET(UNBOUND_LIBRARIES @prefix@/lib/libunbound.a)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
SET(LIBUSB-1.0_LIBRARY @prefix@/lib/libusb-1.0.a)
SET(LIBUDEV_LIBRARY @prefix@/lib/libudev.a)
SET(Protobuf_FOUND 1)
SET(Protobuf_PROTOC_EXECUTABLE @prefix@/native/bin/protoc CACHE FILEPATH "Path to the native protoc")
SET(Protobuf_INCLUDE_DIR @prefix@/include CACHE PATH "Protobuf include dir")
SET(Protobuf_INCLUDE_DIRS @prefix@/include CACHE PATH "Protobuf include dir")
SET(Protobuf_LIBRARY @prefix@/lib/libprotobuf.a CACHE FILEPATH "Protobuf library")
endif()
endif()
SET(ZMQ_INCLUDE_PATH @prefix@/include)
SET(ZMQ_LIB @prefix@/lib/libzmq.a)
SET(Boost_IGNORE_SYSTEM_PATH ON)
SET(BOOST_ROOT @prefix@)
SET(BOOST_INCLUDEDIR @prefix@/include)
SET(BOOST_LIBRARYDIR @prefix@/lib)
SET(Boost_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
SET(Boost_NO_SYSTEM_PATHS ON)
SET(Boost_USE_STATIC_LIBS ON)
SET(Boost_USE_STATIC_RUNTIME ON)
SET(OPENSSL_ROOT_DIR @prefix@)
SET(ARCHITECTURE @arch@)
# for libraries and headers in the target directories
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(ARCHITECTURE STREQUAL "aarch64")
SET(CLANG_TARGET "arm64-apple-darwin11")
SET(CONF_TRIPLE "aarch64-apple-darwin11")
SET(BUILD_TAG "mac-armv8")
SET(CMAKE_OSX_ARCHITECTURES "arm64")
set(ARM ON)
set(ARM_ID "armv8-a")
else()
SET(CLANG_TARGET "x86_64-apple-darwin11")
SET(CONF_TRIPLE "x86_64-apple-darwin11")
SET(BUILD_TAG "mac-x64")
SET(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
SET(_CMAKE_TOOLCHAIN_PREFIX @prefix@/native/bin/${CONF_TRIPLE}-)
SET(CMAKE_C_COMPILER @CC@)
SET(CMAKE_C_COMPILER_TARGET ${CLANG_TARGET})
SET(CMAKE_C_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
SET(CMAKE_CXX_COMPILER @CXX@)
SET(CMAKE_CXX_COMPILER_TARGET ${CLANG_TARGET})
SET(CMAKE_CXX_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
SET(CMAKE_ASM_COMPILER_TARGET ${CLANG_TARGET})
SET(CMAKE_ASM-ATT_COMPILER_TARGET ${CLANG_TARGET})
SET(APPLE True)
SET(BUILD_64 ON)
SET(BREW OFF)
SET(PORT OFF)
SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
SET(CMAKE_CXX_STANDARD 14)
SET(LLVM_ENABLE_PIC OFF)
SET(LLVM_ENABLE_PIE OFF)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
add_definitions(-DUSE_DEVICE_TREZOR=OFF)
add_definitions(-DHIDAPI_DUMMY=ON)
set(HIDAPI_DUMMY ON)
cleanup patches (and other stuff) (#79) * cleanup patches * fix polyseed patch * Fix iOS builds * fix polyseed dependencies * fix polyseed patch for macOS * update ledger patch * update wownero patches and version * update checksums * wip" * update gitmodules * update boost build script * update build_single.sh * vix verbosey_copy * fix __clear_cache bug on wownero * update randomwow * migrate build system * fix cross compilation issues * some more build issue * update polyseed * cleanup cmakelists * fix toolchain.cmake.in * add ssp * another attempt at building windows on CI * fix package name * migrate mirror to my own hosting * change download mirror priority (fallback first) * link ssp in monero module as well by using CMAKE_{C,CXX}_FLAGS * fix android builds * update polyseed source * 13 -> trixie * fix package name conflicts, update runner to sid * update boost to 1_84_0, disable patch that's no longer needed * switch to ubuntu:24.04 * add POLYSEED_STATIC to toolchain.cmake.in in order to properly link * drop patches * fixes to darwin * link missing wowner-seed library * a litte bit more of experiments * build locale only on windows * update iconv * update definitions * update ci builds * update my progress * ios fix, update depends, ci * multithread build system * fix android, mingw and linux build issues * remove dependency check * update Dockerfile to include pigz * show a message when pigz is missing * fix devcontainer mingw setup (missing ENV) * update android build runner * sailfishos dropped (you better go behave yourself and run actual linux programs) * fiz pigz issues * install llvm-ranlib for android * fix iOS build issues * fix dummy ledger patch * fix macos and darwin * fix macos ci * fix macos build command * install autoconf * add automake * add libtool * macos fixes, wownero fixes, idk what else, please help me * fix wownero iOS build * Cleanup patches * add try-catch into monero code * fix error handling * update checksums
2024-12-04 10:22:48 -05:00
SET(ANDROID TRUE)
if(ARCHITECTURE STREQUAL "armv7a")
SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
SET(CMAKE_ANDROID_ARM_MODE ON)
SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21)
SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21)
SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-)
elseif(ARCHITECTURE STREQUAL "aarch64")
SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
elseif(ARCHITECTURE STREQUAL "x86_64")
SET(MONERO_WALLET_CRYPTO_LIBRARY amd64-64-24k)
SET(CMAKE_ANDROID_ARCH_ABI x86_64)
SET(CMAKE_SYSTEM_PROCESSOR "x86_64")
else()
message(SEND_ERROR Unsupported android architecture)
endif()
# SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native)
SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
SET(__ANDROID_API__ 21)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER @CC@)
SET(CMAKE_CXX_COMPILER @CXX@)
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(USE_DEVICE_TREZOR OFF)
add_definitions(-DHIDAPI_DUMMY=ON)
set(HIDAPI_DUMMY ON)
add_definitions(-DUSE_DEVICE_LEDGER=ON)
cleanup patches (and other stuff) (#79) * cleanup patches * fix polyseed patch * Fix iOS builds * fix polyseed dependencies * fix polyseed patch for macOS * update ledger patch * update wownero patches and version * update checksums * wip" * update gitmodules * update boost build script * update build_single.sh * vix verbosey_copy * fix __clear_cache bug on wownero * update randomwow * migrate build system * fix cross compilation issues * some more build issue * update polyseed * cleanup cmakelists * fix toolchain.cmake.in * add ssp * another attempt at building windows on CI * fix package name * migrate mirror to my own hosting * change download mirror priority (fallback first) * link ssp in monero module as well by using CMAKE_{C,CXX}_FLAGS * fix android builds * update polyseed source * 13 -> trixie * fix package name conflicts, update runner to sid * update boost to 1_84_0, disable patch that's no longer needed * switch to ubuntu:24.04 * add POLYSEED_STATIC to toolchain.cmake.in in order to properly link * drop patches * fixes to darwin * link missing wowner-seed library * a litte bit more of experiments * build locale only on windows * update iconv * update definitions * update ci builds * update my progress * ios fix, update depends, ci * multithread build system * fix android, mingw and linux build issues * remove dependency check * update Dockerfile to include pigz * show a message when pigz is missing * fix devcontainer mingw setup (missing ENV) * update android build runner * sailfishos dropped (you better go behave yourself and run actual linux programs) * fiz pigz issues * install llvm-ranlib for android * fix iOS build issues * fix dummy ledger patch * fix macos and darwin * fix macos ci * fix macos build command * install autoconf * add automake * add libtool * macos fixes, wownero fixes, idk what else, please help me * fix wownero iOS build * Cleanup patches * add try-catch into monero code * fix error handling * update checksums
2024-12-04 10:22:48 -05:00
SET(CMAKE_C_COMPILER @CC@)
SET(CMAKE_CXX_COMPILER @CXX@)
else()
SET(CMAKE_C_COMPILER @CC@)
SET(CMAKE_CXX_COMPILER @CXX@)
endif()
if(ARCHITECTURE STREQUAL "arm")
set(ARCH "armv7-a")
set(ARM ON)
set(ARM_ID "armv7-a")
set(BUILD_64 OFF)
set(CMAKE_BUILD_TYPE release)
if(ANDROID)
set(BUILD_TAG "android-armv7")
else()
set(BUILD_TAG "linux-armv7")
endif()
set(ARM7)
elseif(ARCHITECTURE STREQUAL "aarch64")
set(ARCH "armv8-a")
set(ARM ON)
set(ARM_ID "armv8-a")
if(ANDROID)
set(BUILD_TAG "android-armv8")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(BUILD_TAG "linux-armv8")
endif()
set(BUILD_64 ON)
endif()
if(ARCHITECTURE STREQUAL "riscv64")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(BUILD_TAG "linux-riscv64")
endif()
set(ARCH_ID "riscv64")
set(ARCH "rv64gc")
endif()
if(ARCHITECTURE STREQUAL "i686")
SET(ARCH_ID "i386")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(BUILD_TAG "linux-x86")
SET(LINUX_32 ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(BUILD_TAG "win-x32")
endif()
endif()
if(ARCHITECTURE STREQUAL "x86_64")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(BUILD_TAG "linux-x64")
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(BUILD_TAG "freebsd-x64")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(BUILD_TAG "win-x64")
endif()
SET(ARCH_ID "x86_64")
endif()
link_directories(@prefix@/lib)
include_directories(@prefix@/include)
include_directories(@prefix@/include/wownero_seed)
add_definitions(-DPOLYSEED_STATIC=ON)
initial zano commit (#83) * initial zano commit * update checksum, fix zano patches on CI * fix monero builds * fix cmake command * fix: devcontainer on x64 ffigen: add zano zano: add missing free dart: implement zano * update boost filenames * unboost the cmakelists * fix zano boost issues * added patch into proper location * fix various build issues * [skip ci] update tor-connect * fix zano builds for ios * fix apply patches and don't fail-fast * uncomment build depends for monero * build_single.sh fix for macos native builds * disable qemu on arm64 builders from buildjet * fix boost, fix missing symbols (maybe) * fix ordering of crypto and ssl libraries * fix wownero mingw * fetch zano releases to release-bulk * build things 'the zano way' * proper cmake config * Zano.. yeah... * Update zano release to 2.0.1.367 * update zano patches * update zano builds * update zano build * fix zano build * move zlibstatic to the top (this shouldn't matter anyway) * fix patch location, update tor-connect * update ci runner * fix zano build on the CI * enable zano for other targets * nvm * don't use darwin in single release file * Increase max password length * build contrib/depends offline * zano support for macos * Update dependencies to work on multithread via rosetta2 * different way of adding .patch-applied * Improve performance of incremental builds * remove unnecessary patches * update coin-control patch * fix test * remove contrib/depends patches in wownero * chore: support fallback names in the download_deps util --------- Co-authored-by: Im-Beast <franik.mateusz@gmail.com>
2025-01-04 09:02:44 +01:00
add_definitions(-DMOBILE_WALLET_BUILD)
cleanup patches (and other stuff) (#79) * cleanup patches * fix polyseed patch * Fix iOS builds * fix polyseed dependencies * fix polyseed patch for macOS * update ledger patch * update wownero patches and version * update checksums * wip" * update gitmodules * update boost build script * update build_single.sh * vix verbosey_copy * fix __clear_cache bug on wownero * update randomwow * migrate build system * fix cross compilation issues * some more build issue * update polyseed * cleanup cmakelists * fix toolchain.cmake.in * add ssp * another attempt at building windows on CI * fix package name * migrate mirror to my own hosting * change download mirror priority (fallback first) * link ssp in monero module as well by using CMAKE_{C,CXX}_FLAGS * fix android builds * update polyseed source * 13 -> trixie * fix package name conflicts, update runner to sid * update boost to 1_84_0, disable patch that's no longer needed * switch to ubuntu:24.04 * add POLYSEED_STATIC to toolchain.cmake.in in order to properly link * drop patches * fixes to darwin * link missing wowner-seed library * a litte bit more of experiments * build locale only on windows * update iconv * update definitions * update ci builds * update my progress * ios fix, update depends, ci * multithread build system * fix android, mingw and linux build issues * remove dependency check * update Dockerfile to include pigz * show a message when pigz is missing * fix devcontainer mingw setup (missing ENV) * update android build runner * sailfishos dropped (you better go behave yourself and run actual linux programs) * fiz pigz issues * install llvm-ranlib for android * fix iOS build issues * fix dummy ledger patch * fix macos and darwin * fix macos ci * fix macos build command * install autoconf * add automake * add libtool * macos fixes, wownero fixes, idk what else, please help me * fix wownero iOS build * Cleanup patches * add try-catch into monero code * fix error handling * update checksums
2024-12-04 10:22:48 -05:00
if (ANDROID OR IOS)
add_definitions(-DFORCE_USE_HEAP=1)
endif()
cleanup patches (and other stuff) (#79) * cleanup patches * fix polyseed patch * Fix iOS builds * fix polyseed dependencies * fix polyseed patch for macOS * update ledger patch * update wownero patches and version * update checksums * wip" * update gitmodules * update boost build script * update build_single.sh * vix verbosey_copy * fix __clear_cache bug on wownero * update randomwow * migrate build system * fix cross compilation issues * some more build issue * update polyseed * cleanup cmakelists * fix toolchain.cmake.in * add ssp * another attempt at building windows on CI * fix package name * migrate mirror to my own hosting * change download mirror priority (fallback first) * link ssp in monero module as well by using CMAKE_{C,CXX}_FLAGS * fix android builds * update polyseed source * 13 -> trixie * fix package name conflicts, update runner to sid * update boost to 1_84_0, disable patch that's no longer needed * switch to ubuntu:24.04 * add POLYSEED_STATIC to toolchain.cmake.in in order to properly link * drop patches * fixes to darwin * link missing wowner-seed library * a litte bit more of experiments * build locale only on windows * update iconv * update definitions * update ci builds * update my progress * ios fix, update depends, ci * multithread build system * fix android, mingw and linux build issues * remove dependency check * update Dockerfile to include pigz * show a message when pigz is missing * fix devcontainer mingw setup (missing ENV) * update android build runner * sailfishos dropped (you better go behave yourself and run actual linux programs) * fiz pigz issues * install llvm-ranlib for android * fix iOS build issues * fix dummy ledger patch * fix macos and darwin * fix macos ci * fix macos build command * install autoconf * add automake * add libtool * macos fixes, wownero fixes, idk what else, please help me * fix wownero iOS build * Cleanup patches * add try-catch into monero code * fix error handling * update checksums
2024-12-04 10:22:48 -05:00
#Create a new global cmake flag that indicates building with depends
set (DEPENDS true)