mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-03-27 22:49:02 +08:00
snap : try to fix install target
This commit is contained in:
@@ -5,6 +5,7 @@ set(GGWAVE_VERSION_PYTHON 0.2.1)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS "on")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
set(GGWAVE_STANDALONE ON)
|
||||
@@ -97,3 +98,17 @@ 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()
|
||||
|
||||
@@ -43,8 +43,4 @@ else()
|
||||
imgui-sdl2
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
install(TARGETS ${TARGET} RUNTIME DESTINATION bin)
|
||||
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()
|
||||
|
||||
@@ -20,7 +20,7 @@ The main purpose of this app is to showcase the capabilities of the [ggwave](htt
|
||||
sudo snap install waver
|
||||
sudo snap connect waver:audio-record :audio-record
|
||||
```
|
||||
|
||||
|
||||
#### Mac OS
|
||||
|
||||
```bash
|
||||
|
||||
@@ -23,10 +23,13 @@ const float kGlobalImGuiScale = 1.25f;
|
||||
// ImGui helpers
|
||||
|
||||
bool ImGui_tryLoadFont(const std::string & filename, float size = 14.0f, bool merge = false) {
|
||||
printf("Trying to load font from '%s' ..\n", filename.c_str());
|
||||
std::ifstream f(filename);
|
||||
if (f.good() == false) {
|
||||
printf(" - failed\n");
|
||||
return false;
|
||||
}
|
||||
printf(" - success\n");
|
||||
if (merge) {
|
||||
// todo : ugly static !!!
|
||||
static ImWchar ranges[] = { 0xf000, 0xf3ff, 0 };
|
||||
@@ -227,10 +230,12 @@ int main(int argc, char** argv) {
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user