gtk check

This commit is contained in:
AzaezelX 2023-05-31 17:07:05 -05:00
parent 06f20a0476
commit af88962d04

View file

@ -10,7 +10,14 @@ elseif (UNIX)
if (TORQUE_USE_ZENITY)
set(TORQUE_NFD_SOURCES ${TORQUE_NFD_COMMON_SOURCES} "${TORQUE_NFD_ROOT}/nfd_zenity.c")
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER})
set(TORQUE_NFD_SOURCES ${TORQUE_NFD_COMMON_SOURCES} "${TORQUE_NFD_ROOT}/nfd_gtk.c")
endif()
elseif (WIN32)
@ -19,3 +26,7 @@ endif(APPLE)
add_library(nativeFileDialogs STATIC ${TORQUE_NFD_SOURCES})
target_include_directories(nativeFileDialogs PUBLIC ${TORQUE_NFD_INCLUDE_DIRECTORIES})
if(UNIX)
target_link_libraries(nativeFileDialogs ${GTK3_LIBRARIES})
endif()