mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 00:15:45 -04:00
Use gtk3 for nativefiledialog
Rational: gtk2 is not maintained anymore and the change was simple. - Update of nativefiledialog/CMakeLists.txt in order to detect and use gtk3 - Updated a few files referencing gtk2, especially: - github workflow: I tested that the apt-get update works on ubuntu 18.03 in a docker container - Readme. This was tested in the following nixpkgs PR: https://github.com/NixOS/nixpkgs/pull/107878
This commit is contained in:
@ -14,12 +14,13 @@ if(WIN32)
|
||||
elseif(APPLE)
|
||||
target_sources(nativefiledialog PRIVATE src/nfd_cocoa.m)
|
||||
else()
|
||||
find_package(GTK2 2.6 COMPONENTS gtk)
|
||||
if(GTK2_FOUND)
|
||||
FIND_PACKAGE(PkgConfig REQUIRED)
|
||||
PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0)
|
||||
if(GTK3_FOUND)
|
||||
message("Using GTK for nativefiledialog")
|
||||
target_sources(nativefiledialog PRIVATE src/nfd_gtk.c)
|
||||
target_include_directories(nativefiledialog PRIVATE ${GTK2_INCLUDE_DIRS})
|
||||
target_link_libraries(nativefiledialog PRIVATE ${GTK2_LIBRARIES})
|
||||
target_include_directories(nativefiledialog PRIVATE ${GTK3_INCLUDE_DIRS})
|
||||
target_link_libraries(nativefiledialog PRIVATE ${GTK3_LIBRARIES})
|
||||
else()
|
||||
message(WARNING "Unknown platform for nativefiledialog")
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user