Files
test2/build_files/build_environment/cmake/jemalloc.cmake
Brecht Van Lommel f8e78b8236 Refactor: Move Linux/macOS harvest to individual files
More closely matching Windows and easier to update.

Pull Request: https://projects.blender.org/blender/blender/pulls/123196
2024-07-02 16:49:22 +02:00

28 lines
880 B
CMake

# SPDX-FileCopyrightText: 2006-2022 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
ExternalProject_Add(external_jemalloc
URL file://${PACKAGE_DIR}/${JEMALLOC_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JEMALLOC_HASH_TYPE}=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ &&
make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ &&
make install
INSTALL_DIR ${LIBDIR}/jemalloc
)
harvest(external_jemalloc jemalloc/include jemalloc/include "*.h")
harvest(external_jemalloc jemalloc/lib jemalloc/lib "*.a")