diff options
Diffstat (limited to 'build_files/build_environment/cmake')
-rw-r--r-- | build_files/build_environment/cmake/check_software.cmake | 14 | ||||
-rw-r--r-- | build_files/build_environment/cmake/download.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/cmake/epoxy.cmake | 25 | ||||
-rw-r--r-- | build_files/build_environment/cmake/glew.cmake | 16 | ||||
-rw-r--r-- | build_files/build_environment/cmake/harvest.cmake | 7 | ||||
-rw-r--r-- | build_files/build_environment/cmake/versions.cmake | 10 |
6 files changed, 36 insertions, 38 deletions
diff --git a/build_files/build_environment/cmake/check_software.cmake b/build_files/build_environment/cmake/check_software.cmake index 080c1e52973..cc8fead6f81 100644 --- a/build_files/build_environment/cmake/check_software.cmake +++ b/build_files/build_environment/cmake/check_software.cmake @@ -12,21 +12,13 @@ if(UNIX) automake bison ${_libtoolize_name} + meson + ninja pkg-config tclsh yasm ) - if(NOT APPLE) - set(_required_software - ${_required_software} - - # Needed for Mesa. - meson - ninja - ) - endif() - foreach(_software ${_required_software}) find_program(_software_find NAMES ${_software}) if(NOT _software_find) @@ -57,7 +49,7 @@ if(UNIX) " apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n" "\n" "On macOS (with homebrew):\n" - " brew install autoconf automake bison flex libtool pkg-config yasm\n" + " brew install autoconf automake bison flex libtool meson ninja pkg-config yasm\n" "\n" "Other platforms:\n" " Install equivalent packages.\n") diff --git a/build_files/build_environment/cmake/download.cmake b/build_files/build_environment/cmake/download.cmake index 547bf77f8dd..938a140194a 100644 --- a/build_files/build_environment/cmake/download.cmake +++ b/build_files/build_environment/cmake/download.cmake @@ -36,7 +36,7 @@ download_source(BLOSC) download_source(PTHREADS) download_source(OPENEXR) download_source(FREETYPE) -download_source(GLEW) +download_source(EPOXY) download_source(FREEGLUT) download_source(ALEMBIC) download_source(OPENSUBDIV) diff --git a/build_files/build_environment/cmake/epoxy.cmake b/build_files/build_environment/cmake/epoxy.cmake new file mode 100644 index 00000000000..4cd9158f2ac --- /dev/null +++ b/build_files/build_environment/cmake/epoxy.cmake @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +if(WIN32) + set(EPOXY_LIB_TYPE shared) +else() + set(EPOXY_LIB_TYPE static) +endif() +ExternalProject_Add(external_epoxy + URL file://${PACKAGE_DIR}/${EPOXY_FILE} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${EPOXY_HASH_TYPE}=${EPOXY_HASH} + PREFIX ${BUILD_DIR}/epoxy + PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/epoxy/src/external_epoxy/ < ${PATCH_DIR}/epoxy.diff + CONFIGURE_COMMAND ${CONFIGURE_ENV} && meson setup --prefix ${LIBDIR}/epoxy --default-library ${EPOXY_LIB_TYPE} --libdir lib ${BUILD_DIR}/epoxy/src/external_epoxy-build ${BUILD_DIR}/epoxy/src/external_epoxy -Dtests=false + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) + +if(BUILD_MODE STREQUAL Release AND WIN32) + ExternalProject_Add_Step(external_epoxy after_install + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/epoxy/include ${HARVEST_TARGET}/epoxy/include + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/bin/epoxy-0.dll ${HARVEST_TARGET}/epoxy/bin/epoxy-0.dll + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/lib/epoxy.lib ${HARVEST_TARGET}/epoxy/lib/epoxy.lib + DEPENDEES install + ) +endif() diff --git a/build_files/build_environment/cmake/glew.cmake b/build_files/build_environment/cmake/glew.cmake deleted file mode 100644 index 0745ad01533..00000000000 --- a/build_files/build_environment/cmake/glew.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -set(GLEW_EXTRA_ARGS - -DBUILD_UTILS=Off - -DBUILD_SHARED_LIBS=Off -) - -ExternalProject_Add(external_glew - URL file://${PACKAGE_DIR}/${GLEW_FILE} - DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL_HASH ${GLEW_HASH_TYPE}=${GLEW_HASH} - PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt - PREFIX ${BUILD_DIR}/glew - CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS} - INSTALL_DIR ${LIBDIR}/glew -) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index 7ebad7a3da2..6ed98398fde 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -22,9 +22,6 @@ if(BUILD_MODE STREQUAL Release) # freeglut-> opengl ${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ && - # glew-> opengl - ${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ && DEPENDS ) endif() @@ -75,8 +72,8 @@ harvest(fftw3/lib fftw3/lib "*.a") harvest(flac/lib sndfile/lib "libFLAC.a") harvest(freetype/include freetype/include "*.h") harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a) -harvest(glew/include glew/include "*.h") -harvest(glew/lib glew/lib "*.a") +harvest(epoxy/include epoxy/include "*.h") +harvest(epoxy/lib epoxy/lib "*.a") harvest(gmp/include gmp/include "*.h") harvest(gmp/lib gmp/lib "*.a") harvest(jemalloc/include jemalloc/include "*.h") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index d0bcdc21b20..2a3e64c6bcb 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -80,11 +80,11 @@ set(FREETYPE_HASH bd4e3b007474319909a6b79d50908e85) set(FREETYPE_HASH_TYPE MD5) set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz) -set(GLEW_VERSION 1.13.0) -set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz) -set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066) -set(GLEW_HASH_TYPE MD5) -set(GLEW_FILE glew-${GLEW_VERSION}.tgz) +set(EPOXY_VERSION 1.5.10) +set(EPOXY_URI https://github.com/anholt/libepoxy/archive/refs/tags/${EPOXY_VERSION}.tar.gz) +set(EPOXY_HASH f0730aad115c952e77591fcc805b1dc1) +set(EPOXY_HASH_TYPE MD5) +set(EPOXY_FILE libepoxy-${EPOXY_VERSION}.tar.gz) set(FREEGLUT_VERSION 3.0.0) set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz) |