File: build_libleidenalg.bat

package info (click to toggle)
python-leidenalg 0.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 920 kB
  • sloc: cpp: 1,727; python: 1,269; ansic: 237; sh: 98; makefile: 7
file content (53 lines) | stat: -rwxr-xr-x 1,492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo off

set LIBLEIDENALG_VERSION="0.12.0"

set ROOT_DIR=%cd%
echo Using root dir %ROOT_DIR%

if not exist "%ROOT_DIR%\build-deps\src\" (
  md %ROOT_DIR%\build-deps\src
)

cd "%ROOT_DIR%\build-deps\src"
if not exist "libleidenalg\" (
  echo.
  echo Cloning libleidenalg into %ROOT_DIR%\build-deps\src\libleidenalg
  REM Clone repository if it does not exist yet
  git clone --branch %libleidenalg_VERSION% https://github.com/vtraag/libleidenalg.git
)

REM Make sure the git repository points to the correct version
echo.
echo Checking out %libleidenalg_VERSION} in ${ROOT_DIR%\build-deps\src\libleidenalg
cd "%ROOT_DIR%\build-deps\src\libleidenalg"
git fetch origin tag ${LIBLEIDENALG_VERSION} --no-tags
git checkout ${LIBLEIDENALG_VERSION}

REM Make build directory
if not exist "%ROOT_DIR%\build-deps\build\libleidenalg\" (
  echo.
  echo Make directory %ROOT_DIR%\build-deps\build\libleidenalg
  md %ROOT_DIR%\build-deps\build\libleidenalg
)

REM Configure, build and install
cd "%ROOT_DIR%\build-deps\build\libleidenalg"

echo.
echo Configure libleidenalg build
cmake %ROOT_DIR%\build-deps\src\libleidenalg ^
    -DCMAKE_INSTALL_PREFIX=%ROOT_DIR%\build-deps\install\ ^
    -DBUILD_SHARED_LIBS=ON ^
    -Digraph_ROOT=%ROOT_DIR%\build-deps\install\lib\cmake\igraph\ ^
    %EXTRA_CMAKE_ARGS%

echo.
echo Build libleidenalg
cmake --build . --config Release

echo.
echo Install libleidenalg to %ROOT_DIR%\build-deps\install\
cmake --build . --target install --config Release

cd "%ROOT_DIR%"