find_package (PkgConfig REQUIRED)
pkg_check_modules (GLIB2 REQUIRED glib-2.0)

include_directories (${GLIB2_INCLUDE_DIRS})
link_directories (${GLIB2_LIBRARY_DIRS})

if (CMAKE_COMPILER_IS_GNUCC)
  add_definitions (${GLIB2_CFLAGS_OTHER})
endif ()

# add the main library
add_library (gettextex2 SHARED gettextex2.c)
target_link_libraries (gettextex2 ${GLIB2_LIBRARIES})
