project (gtkmm-test) cmake_minimum_required (VERSION 2.6) # include (FindGTK2) # doesn't work on WIN32 while find_package (PkgConfig REQUIRED) pkg_check_modules (GTK2 REQUIRED gtk+-2.0) pkg_check_modules(GTKMM gtkmm-2.4 glibmm-2.4) include_directories (${GTK2_INCLUDE_DIRS}) link_directories (${GTK2_LIBRARY_DIRS}) add_definitions (${GTK2_CFLAGS_OTHER}) include_directories (${GTKMM_INCLUDE_DIRS}) link_directories (${GTKMM_LIBRARY_DIRS}) add_definitions (${GTKMM_CFLAGS_OTHER}) # add the executable add_executable (gtkmm-test gtkmm-test.cxx) target_link_libraries (gtkmm-test ${GTK2_LIBRARIES} ${GTKMM_LIBRARIES})