From 0b9c159307700f5e5a26fba59cbf245fc6a1742c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 31 Jan 2022 19:10:08 +0800 Subject: [PATCH] Pre-build hunter dependencies --- .../docker/hunter_dependencies/CMakeLists.txt | 33 +++++++++++++++++++ .../Dockerfile | 14 +++++++- .../Dockerfile | 14 +++++++- 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 tool/quick_start/docker/hunter_dependencies/CMakeLists.txt rename tool/quick_start/docker/{ryzomcore_bionic_x86_64 => ryzombuild_bionic_x86_64}/Dockerfile (67%) rename tool/quick_start/docker/{ryzomcore_focal_x86_64 => ryzombuild_focal_x86_64}/Dockerfile (68%) diff --git a/tool/quick_start/docker/hunter_dependencies/CMakeLists.txt b/tool/quick_start/docker/hunter_dependencies/CMakeLists.txt new file mode 100644 index 000000000..865e1ac91 --- /dev/null +++ b/tool/quick_start/docker/hunter_dependencies/CMakeLists.txt @@ -0,0 +1,33 @@ +# Dummy project to pre-build dependencies + +cmake_minimum_required(VERSION 3.0) + +SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") + +INCLUDE("cmake/HunterGate.cmake") + +HunterGate( + URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz" + SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492" + FILEPATH "${CMAKE_CURRENT_LIST_DIR}/cmake/HunterConfig.cmake" +) + +PROJECT(HunterDependencies) + +SET(ON 1) + +HUNTER_ADD_PACKAGE(ZLIB) +HUNTER_ADD_PACKAGE(libxml2) +HUNTER_ADD_PACKAGE(OpenSSL) +HUNTER_ADD_PACKAGE(luabind) +HUNTER_ADD_PACKAGE(CURL) +HUNTER_ADD_PACKAGE(freetype) +HUNTER_ADD_PACKAGE(Jpeg) +HUNTER_ADD_PACKAGE(giflib) +HUNTER_ADD_PACKAGE(PNG) +HUNTER_ADD_PACKAGE(libogg) +HUNTER_ADD_PACKAGE(vorbis) +HUNTER_ADD_PACKAGE(ffmpeg) +HUNTER_ADD_PACKAGE(OpenAL) + +# end of file diff --git a/tool/quick_start/docker/ryzomcore_bionic_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile similarity index 67% rename from tool/quick_start/docker/ryzomcore_bionic_x86_64/Dockerfile rename to tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile index c7e76446a..4e0d576f3 100644 --- a/tool/quick_start/docker/ryzomcore_bionic_x86_64/Dockerfile +++ b/tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \ # RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN apt-get update && apt-get install -y \ - cmake build-essential \ + cmake ninja-build build-essential \ gcc-8 g++-8 \ && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 \ && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 \ @@ -32,6 +32,18 @@ RUN apt-get update && apt-get install -y \ qtbase5-dev qttools5-dev qttools5-dev-tools \ && rm -rf /var/lib/apt/lists/* +RUN mkdir -p hunter_dependencies/cmake + +COPY tool/quick_start/docker/hunter_dependencies/CMakeLists.txt hunter_dependencies/CMakeLists.txt +COPY CMakeModules/HunterGate.cmake hunter_dependencies/cmake/HunterGate.cmake +COPY CMakeModules/HunterConfig.cmake hunter_dependencies/cmake/HunterConfig.cmake + +RUN mkdir -p hunter_dependencies/build \ + && cd hunter_dependencies/build \ + && cmake -DHUNTER_JOBS_NUMBER=$((`nproc` * 3 / 4)) .. \ + && cd ../.. \ + && rm -rf hunter_dependencies + RUN mkdir -p /mnt/nel WORKDIR /mnt/nel diff --git a/tool/quick_start/docker/ryzomcore_focal_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile similarity index 68% rename from tool/quick_start/docker/ryzomcore_focal_x86_64/Dockerfile rename to tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile index 171f6ff79..65531e19c 100644 --- a/tool/quick_start/docker/ryzomcore_focal_x86_64/Dockerfile +++ b/tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \ # RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN apt-get update && apt-get install -y \ - cmake build-essential \ + cmake ninja-build build-essential \ && rm -rf /var/lib/apt/lists/* # Ubuntu 16.04 LTS and Ubuntu 18.04 LTS: @@ -34,6 +34,18 @@ RUN apt-get update && apt-get install -y \ qtbase5-dev qttools5-dev qttools5-dev-tools \ && rm -rf /var/lib/apt/lists/* +RUN mkdir -p hunter_dependencies/cmake + +COPY tool/quick_start/docker/hunter_dependencies/CMakeLists.txt hunter_dependencies/CMakeLists.txt +COPY CMakeModules/HunterGate.cmake hunter_dependencies/cmake/HunterGate.cmake +COPY CMakeModules/HunterConfig.cmake hunter_dependencies/cmake/HunterConfig.cmake + +RUN mkdir -p hunter_dependencies/build \ + && cd hunter_dependencies/build \ + && cmake -DHUNTER_JOBS_NUMBER=$((`nproc` * 3 / 4)) .. \ + && cd ../.. \ + && rm -rf hunter_dependencies + RUN mkdir -p /mnt/nel WORKDIR /mnt/nel