Skip to content

Commit bfa29de

Browse files
authored
Merge pull request #155 from xbmc/cmake/includeOrder
[cmake] prefer repo libs over depends libs
2 parents 4121a22 + 737699a commit bfa29de

5 files changed

Lines changed: 33 additions & 90 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,57 @@
1-
name: Build and run tests
1+
name: Build
22
on: [push, pull_request]
33
env:
44
app_id: screensavers.rsxs
55

66
jobs:
77
build:
8-
runs-on: ${{ matrix.os }}
8+
runs-on: ubuntu-latest
99
strategy:
1010
fail-fast: false
1111
matrix:
1212
include:
13-
- name: "Debian package test"
14-
os: ubuntu-latest
15-
CC: gcc
16-
CXX: g++
17-
DEBIAN_BUILD: true
13+
- name: "GCC build"
14+
CC: gcc
15+
CXX: g++
16+
- name: "Clang build"
17+
CC: clang
18+
CXX: clang++
1819
steps:
19-
- name: Install needed ubuntu depends
20-
env:
21-
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
20+
- name: Install libgl-dev
2221
run: |
23-
if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi
24-
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi
25-
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
22+
sudo apt-get update -qq
23+
sudo apt-get install -y libgl-dev
2624
- name: Checkout Kodi repo
27-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2826
with:
2927
repository: xbmc/xbmc
30-
ref: master
28+
ref: Omega
3129
path: xbmc
3230
- name: Checkout add-on repo
33-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3432
with:
3533
path: ${{ env.app_id }}
34+
- name: Prepare
35+
run: |
36+
mkdir -p ${{ github.workspace }}/xbmc/cmake/addons/addons/${app_id}
37+
echo ${app_id} ${{ github.workspace }}/${app_id} > ${{ github.workspace }}/xbmc/cmake/addons/addons/${app_id}/${app_id}.txt
3638
- name: Configure
3739
env:
3840
CC: ${{ matrix.CC }}
3941
CXX: ${{ matrix.CXX }}
40-
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
4142
run: |
42-
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir -p build && cd build; fi
43-
if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons -DPACKAGE_ZIP=1 ${{ github.workspace }}/xbmc/cmake/addons; fi
44-
if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
45-
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep ${{ github.workspace }}/${app_id}; fi
43+
cmake \
44+
-B ${app_id}/build \
45+
-DADDONS_TO_BUILD=${app_id} \
46+
-DADDON_SRC_PREFIX=${{ github.workspace }} \
47+
-DADDONS_DEFINITION_DIR=${{ github.workspace }}/xbmc/cmake/addons/addons \
48+
-DCMAKE_BUILD_TYPE=Debug \
49+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons \
50+
-DPACKAGE_ZIP=1 \
51+
${{ github.workspace }}/xbmc/cmake/addons
4652
- name: Build
4753
env:
4854
CC: ${{ matrix.CC }}
4955
CXX: ${{ matrix.CXX }}
50-
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
5156
run: |
52-
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id}/build; fi
53-
if [[ $DEBIAN_BUILD != true ]]; then make; fi
54-
if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh ${{ github.workspace }}/${app_id}; fi
57+
make -C ${app_id}/build -j$(getconf _NPROCESSORS_ONLN)

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ else()
1919
add_definitions(${OPENGLES_DEFINITIONS})
2020
endif()
2121

22-
include_directories(${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
23-
${PROJECT_SOURCE_DIR}/lib
22+
include_directories(${PROJECT_SOURCE_DIR}/lib/gli
2423
${PROJECT_SOURCE_DIR}/lib/glm
25-
${PROJECT_SOURCE_DIR}/lib/gli)
24+
${PROJECT_SOURCE_DIR}/lib
25+
${KODI_INCLUDE_DIR}/..) # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
2626

2727
add_subdirectory(lib/kodi/gui/gl)
2828
add_subdirectory(lib/Implicit)

azure-pipelines.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,9 @@ jobs:
4141
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
4242
ARM32-UWP:
4343
GENERATOR: "Visual Studio 17 2022"
44-
ARCHITECTURE: ARM
44+
ARCHITECTURE: ARM,version=10.0.17763.0
4545
CONFIGURATION: Release
4646
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
47-
#ARM64-UWP:
48-
# GENERATOR: "Visual Studio 17 2022"
49-
# ARCHITECTURE: ARM64
50-
# CONFIGURATION: Release
51-
# WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
5247

5348
workspace:
5449
clean: all

src/hufotunnel/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void CScreensaverHufoTunnel::InterLnCircle(double u, double v, double w, float *
488488
*y1 = w * v + d * u;
489489
*x2 = w * u + d * v;
490490
*y2 = w * v - d * u;
491-
#if defined(_DEBUG) && !defined(_WIN32)
491+
#if defined(_DEBUG) && !defined(_WIN32) && !defined(__ANDROID__) && !defined(__APPLE__)
492492
assert (abs ((*x1) * u + (*y1) * v - w) < 1e-6);
493493
assert (abs ((*x2) * u + (*y2) * v - w) < 1e-6);
494494
assert (abs (sqr (*x1) + sqr (*y1) - 1.0f) < 1e-6);

0 commit comments

Comments
 (0)