dev/c/glibmm-test/CMakeLists.txt

30 lines
818 B
CMake

project (glibmm-test)
cmake_minimum_required (VERSION 2.6)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include (FindPkgConfig)
include (cmake_FindGlib)
include_directories (${GLIB_INCLUDE_DIR})
include_directories (${GLIB_PKG_INCLUDE_DIRS})
# 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 (glibmm-test glibmm-test.cxx)
target_link_libraries (glibmm-test ${GTK2_LIBRARIES} ${GTKMM_LIBRARIES})