Note: some dependencies of gtk+ seems to only be pulled with gtk+3, gtkglext seems to require libffi.
```sh
-brew install cmake glib libffi gtk+ gtk+3 pkgconfig minizip webp coreutils gnu-sed wget sassc
+brew install cmake glib gobject-introspection libffi gtk+ gtk+3 gtk-doc pkgconfig minizip webp coreutils gnu-sed wget sassc
brew link --force gettext
```
set(_pkgconfig_REQUIRED REQUIRED)
endif ()
pkg_check_modules(GLIB ${_pkgconfig_REQUIRED} glib-2.0)
+ if (GLIB_LINK_LIBRARIES)
+ set(GLIB_LIBRARIES ${GLIB_LINK_LIBRARIES}) # HACK
+ endif ()
else ()
find_path(GLIB_INCLUDE_DIRS glib.h)
find_library(GLIB_LIBRARIES glib-2.0)
set(_pkgconfig_REQUIRED REQUIRED)
endif ()
pkg_check_modules(GTK2 ${_pkgconfig_REQUIRED} gtk+-2.0)
+ if (GTK2_LINK_LIBRARIES)
+ set(GTK2_LIBRARIES ${GTK2_LINK_LIBRARIES}) # HACK
+ endif ()
else ()
find_path(GTK2_INCLUDE_DIRS gtk.h)
# find_library(GTK2_LIBRARIES)
elseif (WIN32)
pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0)
endif ()
+ if (GtkGLExt_LINK_LIBRARIES)
+ set(GtkGLExt_LIBRARIES ${GtkGLExt_LINK_LIBRARIES}) # HACK
+ endif ()
else ()
find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h)
# find_library(GtkGLExt_LIBRARIES)
set(_pkgconfig_REQUIRED REQUIRED)
endif ()
pkg_check_modules(Minizip ${_pkgconfig_REQUIRED} minizip)
+ if (Minizip_LINK_LIBRARIES)
+ set(Minizip_LIBRARIES ${Minizip_LINK_LIBRARIES}) # HACK
+ endif ()
else ()
find_path(Minizip_INCLUDE_DIRS unzip.h)
# find_library(Minizip_LIBRARIES)
endif ()
pkg_search_module(Pango ${_pkgconfig_REQUIRED} pango pangocairo)
pkg_search_module(PangoFT2 ${_pkgconfig_REQUIRED} pangoft2)
+ if (Pango_LINK_LIBRARIES)
+ set(Pango_LIBRARIES ${Pango_LINK_LIBRARIES}) # HACK
+ endif()
+ if (PangoFT2_LINK_LIBRARIES)
+ set(PangoFT2_LIBRARIES ${PangoFT2_LINK_LIBRARIES}) # HACK
+ endif()
else ()
# find_path(Pango_INCLUDE_DIRS)
# find_library(Pango_LIBRARIES)
target_include_directories(gtkutil PRIVATE uilib)
target_link_libraries(gtkutil PRIVATE uilib)
+find_package(GTK${GTK_TARGET} REQUIRED)
target_include_directories(gtkutil PRIVATE ${GTK${GTK_TARGET}_INCLUDE_DIRS})
target_link_libraries(gtkutil PRIVATE ${GTK${GTK_TARGET}_LIBRARIES})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
find_package(OpenGL REQUIRED)
+find_package(GTK${GTK_TARGET} REQUIRED)
string(SUBSTRING ${CMAKE_SHARED_MODULE_SUFFIX} 1 -1 _clibext)
add_definitions(-DCMAKE_SHARED_MODULE_SUFFIX="${_clibext}")