Skip to content

Commit 04f2e44

Browse files
committed
avoid building multiple times; switch to ninja
1 parent 362b64e commit 04f2e44

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

recipe/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ else
2323
Python_EXECUTABLE=${PYTHON}
2424
fi
2525

26-
cmake ${CMAKE_ARGS} \
26+
cmake -G Ninja \
27+
${CMAKE_ARGS} \
2728
-DUSE_FFMPEG=ON \
2829
-DOIIO_BUILD_TOOLS=OFF \
2930
-DOIIO_BUILD_TESTS=OFF \
@@ -36,6 +37,7 @@ cmake ${CMAKE_ARGS} \
3637
-DINTERNALIZE_FMT=OFF \
3738
..
3839

39-
make all -j${CPU_COUNT}
40+
# Do not install, only build.
41+
cmake --build . --config Release
4042

4143
popd

recipe/install_lib.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
cd build;
2-
make install -j${CPU_COUNT};
1+
#!/bin/bash
2+
set -ex
3+
4+
cmake --install ./build --prefix=./$PREFIX
35

46
# remove python stuff from here.
5-
rm -rf $PREFIX/lib/python*
7+
rm -rf $PREFIX/lib/python*

recipe/install_python.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cd build
2-
make install -j${CPU_COUNT}
1+
#!/bin/bash
2+
set -ex
33

4-
# $PYTHON $RECIPE_DIR/clean_python.py
4+
cmake --install ./build --prefix=./$PREFIX

recipe/meta.yaml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ requirements:
1818
- cross-python_{{ target_platform }} # [build_platform != target_platform]
1919
- pybind11 # [build_platform != target_platform]
2020
- numpy # [build_platform != target_platform]
21-
- cmake
22-
- {{ compiler('cxx') }}
2321
- {{ stdlib("c") }}
24-
- make # [unix]
22+
- {{ compiler("cxx") }}
23+
- cmake
24+
- ninja
2525
host:
2626
- python
2727
- numpy
@@ -52,15 +52,11 @@ outputs:
5252
- {{ pin_subpackage('openimageio', max_pin='x.x') }}
5353
requirements:
5454
build:
55-
- cross-python_{{ target_platform }} # [build_platform != target_platform]
56-
- python # [build_platform != target_platform]
57-
- pybind11 # [build_platform != target_platform]
58-
- numpy # [build_platform != target_platform]
5955
# for strong run-exports
6056
- {{ stdlib("c") }}
6157
- {{ compiler("cxx") }}
6258
- cmake
63-
- make # [unix]
59+
- ninja
6460
host:
6561
- python
6662
- numpy
@@ -93,28 +89,15 @@ outputs:
9389
script: install_python.sh
9490
requirements:
9591
build:
96-
- python # [build_platform != target_platform]
97-
- cross-python_{{ target_platform }} # [build_platform != target_platform]
98-
- pybind11 # [build_platform != target_platform]
99-
- numpy # [build_platform != target_platform]
100-
- cmake
101-
- {{ compiler('cxx') }}
92+
# for strong run-exports
10293
- {{ stdlib("c") }}
103-
- make # [unix]
94+
- {{ compiler("cxx") }}
95+
- cmake
96+
- ninja
10497
host:
10598
- {{ pin_subpackage('openimageio', exact=True) }}
106-
- python
107-
- numpy
108-
- pybind11
109-
- imath
110-
- fmt
111-
- libboost-devel
112-
- tsl_robin_map
113-
- zlib
11499
run:
115100
- {{ pin_subpackage('openimageio', exact=True) }}
116-
- {{ pin_compatible('numpy') }}
117-
- python
118101
test:
119102
imports:
120103
- OpenImageIO

0 commit comments

Comments
 (0)