Compare commits

...

2 commits

Author SHA1 Message Date
eb2bfdfce1
Making sure the window ptr is not null 2025-01-23 21:36:03 +01:00
23ddfc4426
Importing BillySheet 2025-01-23 21:33:36 +01:00
2 changed files with 18 additions and 3 deletions

View file

@ -1,9 +1,22 @@
cmake_minimum_required(VERSION 3.30) cmake_minimum_required(VERSION 3.30)
project(LearnGtk4 LANGUAGES CXX) project(LearnGtk4 LANGUAGES CXX)
include(FetchContent)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(GTKMM4 REQUIRED IMPORTED_TARGET gtkmm-4.0) pkg_check_modules(GTKMM4 REQUIRED IMPORTED_TARGET gtkmm-4.0)
fetchcontent_declare(BillySheet
GIT_REPOSITORY https://gitea.pcornatcloud.fr/Pcornat/BillySheet.git
GIT_SUBMODULES_RECURSE ON
GIT_SHALLOW ON
DOWNLOAD_EXTRACT_TIMESTAMP OFF
OVERRIDE_FIND_PACKAGE
)
option(BILLY_ENABLE_TESTS "Enable Unit testing target" OFF)
fetchcontent_makeavailable(BillySheet)
find_package(BillySheet CONFIG REQUIRED)
find_program(CCACHE_FOUND ccache) find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND) if (CCACHE_FOUND)
message(STATUS "ccache found !") message(STATUS "ccache found !")
@ -86,4 +99,4 @@ target_compile_definitions(LearnGtk4 PUBLIC $<$<CONFIG:Debug>:_GLIBCXX_DEBUG>)
target_compile_definitions(assimp PUBLIC $<$<CONFIG:Debug>:_GLIBCXX_DEBUG>) target_compile_definitions(assimp PUBLIC $<$<CONFIG:Debug>:_GLIBCXX_DEBUG>)
target_compile_options(LearnGtk4 PUBLIC ${COMPILE_FLAGS}) target_compile_options(LearnGtk4 PUBLIC ${COMPILE_FLAGS})
target_link_options(LearnGtk4 PUBLIC ${LINKER_OPTIONS}) target_link_options(LearnGtk4 PUBLIC ${LINKER_OPTIONS})
target_link_libraries(LearnGtk4 PkgConfig::GTKMM4 assimp spdlog_header_only) target_link_libraries(LearnGtk4 PkgConfig::GTKMM4 assimp spdlog_header_only BillySheet)

View file

@ -112,8 +112,10 @@ namespace gui_to_app {
void AppWin2Back::on_quit() noexcept { void AppWin2Back::on_quit() noexcept {
auto windows = get_windows(); auto windows = get_windows();
for (auto *window: windows) { for (auto *window: windows) {
window->set_visible(false); if (window != nullptr) {
delete window; window->set_visible(false);
delete window;
}
} }
quit(); quit();
} }