diff --git a/CMakeLists.txt b/CMakeLists.txt index 00c65f9..a4c40d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 728a5d1..4434c5f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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() diff --git a/examples/third-party/ggsock b/examples/third-party/ggsock index cb2f795..e1a2377 160000 --- a/examples/third-party/ggsock +++ b/examples/third-party/ggsock @@ -1 +1 @@ -Subproject commit cb2f795301a59bcd03f3cabca72a7767a9ff0cbc +Subproject commit e1a2377de44a23e42654cd4e7fd44313c57e4cf6 diff --git a/examples/third-party/imgui/CMakeLists.txt b/examples/third-party/imgui/CMakeLists.txt index 584e368..b0df6ae 100644 --- a/examples/third-party/imgui/CMakeLists.txt +++ b/examples/third-party/imgui/CMakeLists.txt @@ -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() diff --git a/examples/waver/CMakeLists.txt b/examples/waver/CMakeLists.txt index e01cdbc..99c0f50 100644 --- a/examples/waver/CMakeLists.txt +++ b/examples/waver/CMakeLists.txt @@ -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) diff --git a/examples/waver/main.cpp b/examples/waver/main.cpp index b946895..ba72040 100644 --- a/examples/waver/main.cpp +++ b/examples/waver/main.cpp @@ -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); - - 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() + "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); + } + + { + 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(); diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 95545fa..ee77dff 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a2981f5..9c5cd2e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,3 +27,5 @@ if (MINGW) stdc++ ) endif() + +install(TARGETS ${TARGET} LIBRARY DESTINATION lib)