forked from LuxCoreRender/LuxCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile
70 lines (48 loc) · 1.55 KB
/
GNUmakefile
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Credits to Blender Cycles
ifeq ($(OS),Windows_NT)
$(error On Windows, use "cmd //c make.bat" instead of "make")
endif
OS:=$(shell uname -s)
ifndef BUILD_CMAKE_ARGS
BUILD_CMAKE_ARGS:=
endif
ifndef BUILD_DIR
BUILD_DIR:=./build
endif
ifndef INSTALL_DIR
INSTALL_DIR:=./build
endif
SOURCE_DIR:=$(shell pwd)
ifndef PYTHON
PYTHON:=python3
endif
.PHONY: clean deps config luxcore pyluxcore luxcoreui luxcoreconsole
all: luxcore pyluxcore luxcoreui luxcoreconsole
luxcore: config
cmake $(BUILD_CMAKE_ARGS) --build --preset conan-release --target luxcore
cmake --install $(BUILD_DIR)/cmake --prefix $(BUILD_DIR) --component luxcore
pyluxcore: config
cmake $(BUILD_CMAKE_ARGS) --build --preset conan-release --target pyluxcore
cmake --install $(BUILD_DIR)/cmake --prefix $(BUILD_DIR) --component pyluxcore
luxcoreui: config
cmake $(BUILD_CMAKE_ARGS) --build --preset conan-release --target luxcoreui
cmake --install $(BUILD_DIR)/cmake --prefix $(BUILD_DIR) --component luxcoreui
luxcoreconsole: config
cmake $(BUILD_CMAKE_ARGS) --build --preset conan-release --target luxcoreconsole
cmake --install $(BUILD_DIR)/cmake --prefix $(BUILD_DIR) --component luxcoreconsole
# TODO Make debug targets
clean:
cmake --build --preset conan-release --target clean
config:
cmake $(BUILD_CMAKE_ARGS) --preset conan-release \
-DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) \
-S $(SOURCE_DIR)
install:
cmake --install $(BUILD_DIR)/cmake --prefix $(BUILD_DIR)
# Presets independant
clear:
rm -rf $(BUILD_DIR)
deps:
$(PYTHON) cmake/make_deps.py
list-presets:
cmake --list-presets