Skip to content

Commit 293c09a

Browse files
committed
Release v0.3.0-beta2
workflow: use cmake
1 parent 3cc3833 commit 293c09a

3 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
build-essential \
5656
pkg-config \
5757
make \
58+
cmake \
5859
git \
5960
zip \
6061
fuse \
@@ -98,10 +99,10 @@ jobs:
9899
libcurl-devel
99100
mingw-w64-x86_64-7zip
100101
mingw-w64-x86_64-directx-headers
101-
mingw-w64-x86_64-ncurses
102+
mingw-w64-x86_64-make
102103
mingw-w64-x86_64-toolchain
103104
mingw-w64-x86_64-minizip
104-
mingw-w64-x86_64-gcc
105+
mingw-w64-x86_64-cmake
105106
mingw-w64-x86_64-zbar
106107
mingw-w64-x86_64-make
107108
mingw-w64-x86_64-tesseract-ocr
@@ -116,19 +117,25 @@ jobs:
116117
- name: Build project (Linux)
117118
if: matrix.os != 'windows-latest'
118119
run: |
119-
make all DEBUG=0 LDFLAGS="-Wl,--as-needed"
120+
#make all DEBUG=0 LDFLAGS="-Wl,--as-needed"
121+
mkdir -p build
122+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
123+
cd build && make
120124
121125
- name: Build project (Windows)
122126
if: matrix.os == 'windows-latest'
123127
shell: msys2 {0}
124128
run: |
125-
mingw32-make all DEBUG=0
129+
#mingw32-make all DEBUG=0 WINDOWS_CMD=0
130+
mkdir -p build
131+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWINDOWS_CMD=OFF
132+
cd build && make
126133
127134
- name: Prepare Linux package
128135
if: matrix.os == 'ubuntu-latest'
129136
run: |
130137
mkdir -p package/oshot
131-
cp ./build/release/oshot ./launcher/oshot_launcher.py package/oshot/
138+
cp ./build/oshot ./launcher/oshot_launcher.py package/oshot/
132139
echo "#!/bin/bash" > package/oshot/install.sh
133140
echo "cp oshot /usr/local/bin/oshot" >> package/oshot/install.sh
134141
echo "cp oshot_launcher.py /usr/local/bin/oshot_launcher" >> package/oshot/install.sh
@@ -140,7 +147,7 @@ jobs:
140147
if: matrix.os == 'ubuntu-22.04'
141148
run: |
142149
mkdir -p package/oshot
143-
./scripts/create_appimage.sh ./build/release/oshot oshot-x86_64.AppImage
150+
./scripts/create_appimage.sh ./build/oshot oshot-x86_64.AppImage
144151
chmod +x oshot-x86_64.AppImage
145152
mv oshot-x86_64.AppImage package/oshot/
146153
cp ./launcher/oshot_launcher.py package/oshot/
@@ -153,7 +160,7 @@ jobs:
153160
run: |
154161
mkdir -p package/oshot
155162
sed -i 's|#!/bin/env python3|#!python|' launcher/oshot_launcher.py
156-
cp ./build/release/oshot.exe package/oshot/
163+
cp ./build/oshot.exe package/oshot/
157164
cp ./launcher/oshot_launcher.py package/oshot/oshot_launcher.pyw
158165
# Copy required DLLs
159166
ldd ./build/release/oshot.exe | grep -i mingw | awk '{print $3}' | xargs -I {} cp {} package/oshot/ || true

CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ add_custom_target(
9494
)
9595
add_dependencies(${PROJECT_NAME} genver)
9696

97-
target_include_directories(
98-
${PROJECT_NAME}
99-
PRIVATE
100-
${CMAKE_SOURCE_DIR}/include
101-
${CMAKE_SOURCE_DIR}/include/libs
102-
${CMAKE_SOURCE_DIR}/include/libs/imgui
97+
include_directories(
98+
include
99+
include/libs
100+
include/libs/imgui
103101
)
104102

105103
target_compile_options(

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VARS ?=
55
CXXSTD ?= c++20
66

77
DEBUG ?= 0
8-
WINDOWS_CMD ?= 1
8+
WINDOWS_CMD ?= 0
99
ENABLE_PORTALS ?= 1
1010

1111
COMPILER := $(shell $(CXX) --version | head -n1)

0 commit comments

Comments
 (0)