looper/backends/ui/gtk/CMakeLists.txt

15 lines
743 B
Text
Raw Normal View History

2024-03-26 18:39:02 -07:00
set(BACKEND_GTK_SRC_BASE main.cpp main_window.cpp my_slider.cpp options_window.cpp theme.cpp about_window.cpp)
set(BACKEND_GTK_SRC )
foreach(SRC IN ITEMS ${BACKEND_GTK_SRC_BASE})
set(BACKEND_GTK_SRC ${BACKEND_GTK_SRC} ${CMAKE_CURRENT_SOURCE_DIR}/${SRC})
endforeach()
set(BACKEND_GTK_INC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
pkg_check_modules(GTK4 IMPORTED_TARGET gtk4)
pkg_check_modules(gtkmm4 IMPORTED_TARGET gtkmm-4.0)
if (GTK4_FOUND AND gtkmm4_FOUND)
add_ui_backend(gtk_ui ${BACKEND_GTK_SRC})
target_link_libraries(gtk_ui PRIVATE PkgConfig::GTK4 PkgConfig::gtkmm4)
target_include_directories(gtk_ui PRIVATE ${BACKEND_GTK_INC})
else()
message("Gtkmm-4.0 not found - Not enabling GTK backend.")
endif()