Enhance CI configuration and CMake support for native file dialog
- Updated CI workflow in ci.yml to include the -Wno-dev flag for improved CMake output during configuration. - Modified CMakeLists.txt to conditionally add native file dialog support based on platform checks and GTK3 availability, enhancing compatibility and providing clearer status messages for NFD support.
This commit is contained in:
@@ -43,10 +43,29 @@ endforeach()
|
||||
|
||||
# Conditionally add native file dialog (optional for CI builds)
|
||||
if(NOT YAZE_MINIMAL_BUILD)
|
||||
add_subdirectory(lib/nativefiledialog-extended)
|
||||
set(YAZE_HAS_NFD ON)
|
||||
# Check if we can build NFD before adding it
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND AND UNIX AND NOT APPLE)
|
||||
pkg_check_modules(GTK3 QUIET gtk+-3.0)
|
||||
if(GTK3_FOUND)
|
||||
add_subdirectory(lib/nativefiledialog-extended)
|
||||
set(YAZE_HAS_NFD ON)
|
||||
message(STATUS "NFD enabled with GTK3 support")
|
||||
else()
|
||||
set(YAZE_HAS_NFD OFF)
|
||||
message(STATUS "NFD disabled - GTK3 not found")
|
||||
endif()
|
||||
elseif(WIN32 OR APPLE)
|
||||
add_subdirectory(lib/nativefiledialog-extended)
|
||||
set(YAZE_HAS_NFD ON)
|
||||
message(STATUS "NFD enabled for Windows/macOS")
|
||||
else()
|
||||
set(YAZE_HAS_NFD OFF)
|
||||
message(STATUS "NFD disabled - no platform support")
|
||||
endif()
|
||||
else()
|
||||
set(YAZE_HAS_NFD OFF)
|
||||
message(STATUS "NFD disabled for minimal build")
|
||||
endif()
|
||||
|
||||
if (YAZE_BUILD_APP)
|
||||
|
||||
Reference in New Issue
Block a user