Skip to content

Commit abaa1da

Browse files
committed
feat: update modules
1 parent d553788 commit abaa1da

File tree

12 files changed

+37
-47
lines changed

12 files changed

+37
-47
lines changed

.github/workflows/macos.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ jobs:
99
targetName: ScopeGUI
1010

1111
steps:
12-
- uses: actions/checkout@v1
12+
- uses: actions/checkout@v3
1313
with:
14-
fetch-depth: 1
15-
16-
- name: Submodules
17-
run: git submodule update --init --recursive
14+
submodules: recursive
1815

1916
- name: CMake Build
2017
run: |

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ jobs:
1414
sudo apt-get update
1515
sudo apt-get install -y libsdl2-dev
1616
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v3
1818
with:
19-
fetch-depth: 1
20-
21-
- name: Submodules
22-
run: git submodule update --init --recursive
19+
submodules: recursive
2320

2421
- name: CMake Build
2522
run: |

.github/workflows/windows.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ jobs:
88
env:
99
targetName: ScopeGUI
1010
steps:
11-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v3
1212
with:
13-
fetch-depth: 1
14-
15-
- name: Submodules
16-
run: git submodule update --init --recursive
13+
submodules: recursive
1714

1815
- name: CMake Build
1916
shell: powershell

.gitmodules

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[submodule "third_party/imgui"]
22
path = third_party/imgui
3-
url = https://github.com/ocornut/imgui.git
3+
url = git@github.com:ocornut/imgui.git
44
[submodule "modules/SmartSerial"]
55
path = modules/SmartSerial
6-
url = https://github.com/shuai132/SmartSerial
6+
url = git@github.com:shuai132/SmartSerial
77
[submodule "modules/log"]
88
path = modules/log
9-
url = https://github.com/shuai132/LOG.git
9+
url = git@github.com:shuai132/LOG.git
1010
[submodule "third_party/glfw"]
1111
path = third_party/glfw
12-
url = https://github.com/glfw/glfw.git
13-
[submodule "third_party/asio"]
14-
path = third_party/asio
15-
url = https://gitee.com/shuai132/asio.git
12+
url = [email protected]:glfw/glfw.git
1613
[submodule "modules/ScopeCore"]
1714
path = modules/ScopeCore
18-
url = https://github.com/shuai132/ScopeCore.git
15+
url = [email protected]:shuai132/ScopeCore.git
16+
[submodule "third_party/asio"]
17+
path = third_party/asio
18+
url = [email protected]:chriskohlhoff/asio.git

App/ui/UIFFT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void UIFFT::onDraw() {
3636

3737
const auto& Fn = fftNum;
3838
char overlay_text[128];
39-
sprintf(overlay_text, "FFT Analysis(N=%d): fre=%.3fHz, amp=%.3fmV, pha=%.3f°", Fn, fftFre, fftAmp, fftPha);
39+
snprintf(overlay_text, sizeof(overlay_text), "FFT Analysis(N=%d): fre=%.3fHz, amp=%.3fmV, pha=%.3f°", Fn, fftFre, fftAmp, fftPha);
4040

4141
std::vector<size_t> shouldShowAxisIdx;
4242
{

CMakeLists.txt

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.1)
22

3+
# common
4+
set(CMAKE_CXX_STANDARD 14)
5+
add_compile_options(-Wall)
6+
37
project(ScopeGUI C CXX)
48

59
# OpenGL
@@ -16,18 +20,17 @@ add_subdirectory(third_party/glfw)
1620
link_libraries(glfw)
1721

1822
# ImGui
19-
set(IMGUI_DIR third_party/imgui)
23+
set(IMGUI_DIR ${CMAKE_CURRENT_LIST_DIR}/third_party/imgui)
2024
set(GL_DIR ${IMGUI_DIR}/examples/libs/gl3w)
2125
add_library(imgui
22-
${IMGUI_DIR}/examples/imgui_impl_glfw.cpp
23-
${IMGUI_DIR}/examples/imgui_impl_opengl2.cpp
26+
${IMGUI_DIR}/backends/imgui_impl_glfw.cpp
27+
${IMGUI_DIR}/backends/imgui_impl_opengl2.cpp
2428
${IMGUI_DIR}/imgui.cpp
2529
${IMGUI_DIR}/imgui_draw.cpp
2630
${IMGUI_DIR}/imgui_demo.cpp
27-
${IMGUI_DIR}/imgui_widgets.cpp
28-
${GL_DIR}/GL/gl3w.c)
29-
target_include_directories(imgui PUBLIC
30-
${IMGUI_DIR} ${GL_DIR} ${IMGUI_DIR}/examples)
31+
${IMGUI_DIR}/imgui_tables.cpp
32+
${IMGUI_DIR}/imgui_widgets.cpp)
33+
target_include_directories(imgui PUBLIC ${IMGUI_DIR} ${GL_DIR} ${IMGUI_DIR}/backends)
3134
link_libraries(imgui)
3235

3336
# SmartSerial
@@ -41,20 +44,16 @@ include_directories(modules/log)
4144
add_definitions(-DASIO_STANDALONE)
4245
include_directories(third_party/asio/asio/include)
4346

44-
# common
45-
set(CMAKE_CXX_STANDARD 11)
46-
add_compile_options(-Wall)
47-
48-
if(MINGW)
47+
if (MINGW)
4948
link_libraries(ws2_32)
50-
endif()
49+
endif ()
5150

52-
if(CMAKE_BUILD_TYPE MATCHES "Release")
53-
if(MINGW)
51+
if (CMAKE_BUILD_TYPE MATCHES "Release")
52+
if (MINGW)
5453
set(CMAKE_EXE_LINKER_FLAGS "-static -s")
55-
endif()
54+
endif ()
5655
set(BUILD_AS_APP WIN32 MACOSX_BUNDLE)
57-
endif()
56+
endif ()
5857

5958
# ScopeCore
6059
add_subdirectory(modules/ScopeCore)

third_party/asio

Submodule asio updated 1582 files

0 commit comments

Comments
 (0)