Rename *ll* and *ul* to ll and ul in in-interval
[maxima.git] / crosscompile-windows / vtk / CMakeLists.txt
blob11e6e12e51c9783c62e2cdbd71274364c193e87d
1 # CMake file for crosscompiling Maxima/wxMaxima for Windows
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (C) by Wolfgang Dautermann
4 # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
5 # This is free software: you are free to change and redistribute it.
6 # There is NO WARRANTY, to the extent permitted by law.
8 # If you want to use a updated version of a program,
9 # update the version number and the checksum.
10 # If no further patches are needed, you should get a
11 # updated setup-file automatically.
14 if(BUILD_64BIT)
15     set(VTK_MD5 "f75e6f49c167c464192fbc8ef473954a")
16     set(VTK_INSTALLERNAME "vtkpython-7.1.1-Windows-64bit.exe")
17     set(VTK_URL "https://www.vtk.org/files/release/7.1/${VTK_INSTALLERNAME}")
18 else()
19     set(VTK_MD5 "8d8b0878be81a0ab471e929f828dfe9a")
20     set(VTK_INSTALLERNAME "vtkpython-6.3.0-Windows-32bit.exe")
21     set(VTK_URL "https://www.vtk.org/files/release/6.3/${VTK_INSTALLERNAME}")
22 endif()
26 externalproject_add(vtk
27     URL "${VTK_URL}"
28     DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/downloads
29     DOWNLOAD_NO_EXTRACT 1
30     URL_MD5 ${VTK_MD5}
31     CONFIGURE_COMMAND ""
32     BUILD_COMMAND ""
33     INSTALL_COMMAND ""
35 # older versions of 7z extract the contents of the VTK installer
36 # into the directory "$_OUTDIR/bin/" newer into "bin/". Don't know why.
37 # To make this uniform, test if the directory "${CMAKE_BINARY_DIR}/vtk/\$_OUTDIR/bin/"
38 # exists, and rename the directory.
39 ExternalProject_Add_Step(vtk extract
40     COMMENT "Performing extraction step for 'VTK'"
41     COMMAND mkdir -p "${CMAKE_BINARY_DIR}/vtk" && cd "${CMAKE_BINARY_DIR}/vtk" && ${SEVENZIP_EXE} x -y "${CMAKE_SOURCE_DIR}/downloads/${VTK_INSTALLERNAME}" && test -d "${CMAKE_BINARY_DIR}/vtk/\$_OUTDIR/bin/" && mv "${CMAKE_BINARY_DIR}/vtk/\$_OUTDIR/bin/" "${CMAKE_BINARY_DIR}/vtk/bin/" || exit 0
42     DEPENDEES download
43     DEPENDERS patch
46 install(DIRECTORY "${CMAKE_BINARY_DIR}/vtk/bin/" DESTINATION vtk/ COMPONENT VTK)