summaryrefslogtreecommitdiffstats
path: root/core/modules/looking-glass-client/module.build
blob: df334e4109e5c4570ca006b5a688b84184fd81f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
fetch_source() {
	local SRCDIR="${MODULE_WORK_DIR}/src/LookingGlass"
	autoclone
	cde "${SRCDIR}"
	git submodule update --init --recursive || perror "Failed to init and update submodules!"
}

build() {
	local SRCDIR="${MODULE_WORK_DIR}/src/LookingGlass"
	local CLIENTBUILDDIR="client/build"
	mkdir -p "${SRCDIR}/${CLIENTBUILDDIR}" || perror "Failed to create CMake build directory!"
	cde "${SRCDIR}/${CLIENTBUILDDIR}"
	cmake -DENABLE_WAYLAND=no \
		-DENABLE_X11=yes \
		../ || perror "'cmake' failed."
	make || perror "'make' failed."
	mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/bin"
	cp "${SRCDIR}/${CLIENTBUILDDIR}/looking-glass-client" "${MODULE_BUILD_DIR}/opt/openslx/bin/looking-glass-client" || perror "'cp' failed."
}

post_copy() {
	:
}