mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-02-06 00:36:13 +08:00
waver : fix font loading and snap build
This commit is contained in:
@@ -98,17 +98,3 @@ endif()
|
||||
if (GGWAVE_BUILD_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
install(TARGETS ggwave RUNTIME)
|
||||
install(TARGETS ggwave-common RUNTIME)
|
||||
install(TARGETS ggsock RUNTIME)
|
||||
|
||||
if (GGWAVE_SUPPORT_SDL2)
|
||||
install(TARGETS ggwave-common-sdl2 RUNTIME)
|
||||
install(TARGETS imgui RUNTIME)
|
||||
install(TARGETS imgui-sdl2 RUNTIME)
|
||||
install(TARGETS waver RUNTIME)
|
||||
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/examples/assets/fonts/DroidSans.ttf DESTINATION bin)
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/examples/assets/fonts/fontawesome-webfont.ttf DESTINATION bin)
|
||||
endif()
|
||||
|
||||
@@ -99,3 +99,9 @@ if (GGWAVE_SUPPORT_SDL2)
|
||||
add_subdirectory(waver)
|
||||
add_subdirectory(spectrogram)
|
||||
endif()
|
||||
|
||||
install(TARGETS ggwave-common LIBRARY DESTINATION lib)
|
||||
|
||||
if (GGWAVE_SUPPORT_SDL2)
|
||||
install(TARGETS ggwave-common-sdl2 LIBRARY DESTINATION lib)
|
||||
endif()
|
||||
|
||||
2
examples/third-party/ggsock
vendored
2
examples/third-party/ggsock
vendored
Submodule examples/third-party/ggsock updated: cb2f795301...e1a2377de4
6
examples/third-party/imgui/CMakeLists.txt
vendored
6
examples/third-party/imgui/CMakeLists.txt
vendored
@@ -123,3 +123,9 @@ if (GGWAVE_SUPPORT_SDL2)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS imgui LIBRARY DESTINATION lib)
|
||||
|
||||
if (GGWAVE_SUPPORT_SDL2)
|
||||
install(TARGETS imgui-sdl2 LIBRARY DESTINATION lib)
|
||||
endif()
|
||||
|
||||
@@ -43,4 +43,9 @@ else()
|
||||
imgui-sdl2
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/examples/assets/fonts/DroidSans.ttf DESTINATION bin)
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/examples/assets/fonts/fontawesome-webfont.ttf DESTINATION bin)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${TARGET} RUNTIME DESTINATION bin)
|
||||
|
||||
@@ -229,15 +229,21 @@ int main(int argc, char** argv) {
|
||||
ImGui_Init(window, gl_context);
|
||||
ImGui::GetIO().IniFilename = nullptr;
|
||||
|
||||
ImGui_tryLoadFont(getBinaryPath() + "DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
ImGui_tryLoadFont(getBinaryPath() + "../bin/DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
ImGui_tryLoadFont(getBinaryPath() + "../examples/assets/fonts/DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
ImGui_tryLoadFont(getBinaryPath() + "../../examples/assets/fonts/DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
{
|
||||
bool isNotLoaded = true;
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "../bin/DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "../examples/assets/fonts/DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "../../examples/assets/fonts/DroidSans.ttf", kGlobalImGuiScale*14.0f, false);
|
||||
}
|
||||
|
||||
ImGui_tryLoadFont(getBinaryPath() + "fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
ImGui_tryLoadFont(getBinaryPath() + "../bin/fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
ImGui_tryLoadFont(getBinaryPath() + "../examples/assets/fonts/fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
ImGui_tryLoadFont(getBinaryPath() + "../../examples/assets/fonts/fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
{
|
||||
bool isNotLoaded = true;
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "../bin/fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "../examples/assets/fonts/fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
isNotLoaded = isNotLoaded && !ImGui_tryLoadFont(getBinaryPath() + "../../examples/assets/fonts/fontawesome-webfont.ttf", kGlobalImGuiScale*14.0f, true);
|
||||
}
|
||||
|
||||
ImGui_SetStyle();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
source: https://github.com/ggerganov/ggwave
|
||||
source-type: git
|
||||
plugin: cmake
|
||||
configflags: [-DBUILD_SHARED_LIBS=OFF]
|
||||
#configflags: [-DBUILD_SHARED_LIBS=OFF]
|
||||
build-packages:
|
||||
- g++
|
||||
- make
|
||||
|
||||
@@ -27,3 +27,5 @@ if (MINGW)
|
||||
stdc++
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${TARGET} LIBRARY DESTINATION lib)
|
||||
|
||||
Reference in New Issue
Block a user