repertory/cmake/libuuid.cmake
Scott E. Graves 0331152569
All checks were successful
BlockStorage/repertory_windows/pipeline/head This commit looks good
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
add zlib as project dependency
2023-10-29 19:12:16 -05:00

21 lines
1021 B
CMake

if (LINUX)
set(LIBUUID_PROJECT_NAME libuuid_${LIBUUID_VERSION})
set(LIBUUID_BUILD_ROOT ${EXTERNAL_BUILD_ROOT}/builds/${LIBUUID_PROJECT_NAME})
#URL "https://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-${LIBUUID_VERSION}.tar.gz"
ExternalProject_Add(libuuid_project
DOWNLOAD_NO_PROGRESS 1
PREFIX ${LIBUUID_BUILD_ROOT}
URL https://src.fedoraproject.org/repo/pkgs/uuid/uuid-${LIBUUID_VERSION}.tar.gz/5db0d43a9022a6ebbbc25337ae28942f/uuid-${LIBUUID_VERSION}.tar.gz
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/config.guess ./config.guess &&
cp ${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/config.sub ./config.sub &&
CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER};./configure --disable-shared --enable-static --prefix=${EXTERNAL_BUILD_ROOT}
BUILD_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER};make
INSTALL_COMMAND make install
)
set(LIBUUID_LIBRARIES libuuid.a)
add_dependencies(libuuid_project zlib_project)
endif()