Skip to content

Commit

Permalink
feat: update modules
Browse files Browse the repository at this point in the history
  • Loading branch information
shuai132 committed Sep 25, 2023
1 parent d553788 commit bb09322
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 47 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/macos.yml
Expand Up @@ -9,12 +9,9 @@ jobs:
targetName: ScopeGUI

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Submodules
run: git submodule update --init --recursive
submodules: recursive

- name: CMake Build
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ubuntu.yml
Expand Up @@ -14,12 +14,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y libsdl2-dev
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Submodules
run: git submodule update --init --recursive
submodules: recursive

- name: CMake Build
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/windows.yml
Expand Up @@ -8,12 +8,9 @@ jobs:
env:
targetName: ScopeGUI
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Submodules
run: git submodule update --init --recursive
submodules: recursive

- name: CMake Build
shell: powershell
Expand Down
16 changes: 8 additions & 8 deletions .gitmodules
@@ -1,18 +1,18 @@
[submodule "third_party/imgui"]
path = third_party/imgui
url = https://github.com/ocornut/imgui.git
url = git@github.com:ocornut/imgui.git
[submodule "modules/SmartSerial"]
path = modules/SmartSerial
url = https://github.com/shuai132/SmartSerial
url = git@github.com:shuai132/SmartSerial
[submodule "modules/log"]
path = modules/log
url = https://github.com/shuai132/LOG.git
url = git@github.com:shuai132/LOG.git
[submodule "third_party/glfw"]
path = third_party/glfw
url = https://github.com/glfw/glfw.git
[submodule "third_party/asio"]
path = third_party/asio
url = https://gitee.com/shuai132/asio.git
url = git@github.com:glfw/glfw.git
[submodule "modules/ScopeCore"]
path = modules/ScopeCore
url = https://github.com/shuai132/ScopeCore.git
url = git@github.com:shuai132/ScopeCore.git
[submodule "third_party/asio"]
path = third_party/asio
url = git@github.com:chriskohlhoff/asio.git
2 changes: 1 addition & 1 deletion App/ui/UIFFT.cpp
Expand Up @@ -36,7 +36,7 @@ void UIFFT::onDraw() {

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

std::vector<size_t> shouldShowAxisIdx;
{
Expand Down
33 changes: 16 additions & 17 deletions CMakeLists.txt
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.1)

# common
set(CMAKE_CXX_STANDARD 14)
add_compile_options(-Wall)

project(ScopeGUI C CXX)

# OpenGL
Expand All @@ -16,18 +20,17 @@ add_subdirectory(third_party/glfw)
link_libraries(glfw)

# ImGui
set(IMGUI_DIR third_party/imgui)
set(IMGUI_DIR ${CMAKE_CURRENT_LIST_DIR}/third_party/imgui)
set(GL_DIR ${IMGUI_DIR}/examples/libs/gl3w)
add_library(imgui
${IMGUI_DIR}/examples/imgui_impl_glfw.cpp
${IMGUI_DIR}/examples/imgui_impl_opengl2.cpp
${IMGUI_DIR}/backends/imgui_impl_glfw.cpp
${IMGUI_DIR}/backends/imgui_impl_opengl2.cpp
${IMGUI_DIR}/imgui.cpp
${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_demo.cpp
${IMGUI_DIR}/imgui_widgets.cpp
${GL_DIR}/GL/gl3w.c)
target_include_directories(imgui PUBLIC
${IMGUI_DIR} ${GL_DIR} ${IMGUI_DIR}/examples)
${IMGUI_DIR}/imgui_tables.cpp
${IMGUI_DIR}/imgui_widgets.cpp)
target_include_directories(imgui PUBLIC ${IMGUI_DIR} ${GL_DIR} ${IMGUI_DIR}/backends)
link_libraries(imgui)

# SmartSerial
Expand All @@ -41,20 +44,16 @@ include_directories(modules/log)
add_definitions(-DASIO_STANDALONE)
include_directories(third_party/asio/asio/include)

# common
set(CMAKE_CXX_STANDARD 11)
add_compile_options(-Wall)

if(MINGW)
if (MINGW)
link_libraries(ws2_32)
endif()
endif ()

if(CMAKE_BUILD_TYPE MATCHES "Release")
if(MINGW)
if (CMAKE_BUILD_TYPE MATCHES "Release")
if (MINGW)
set(CMAKE_EXE_LINKER_FLAGS "-static -s")
endif()
endif ()
set(BUILD_AS_APP WIN32 MACOSX_BUNDLE)
endif()
endif ()

# ScopeCore
add_subdirectory(modules/ScopeCore)
Expand Down
2 changes: 1 addition & 1 deletion modules/ScopeCore
2 changes: 1 addition & 1 deletion modules/SmartSerial
2 changes: 1 addition & 1 deletion modules/log
2 changes: 1 addition & 1 deletion third_party/asio
Submodule asio updated 1582 files
2 changes: 1 addition & 1 deletion third_party/glfw
Submodule glfw updated 111 files
2 changes: 1 addition & 1 deletion third_party/imgui
Submodule imgui updated 230 files

0 comments on commit bb09322

Please sign in to comment.