cmake_minimum_required(VERSION 2.8)

#project name
PROJECT(gt)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/base/include)

SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")

ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")

SET(PKG_MODULES
        libusbg
)

INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})

FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Wall")

ADD_SUBDIRECTORY(config)
ADD_SUBDIRECTORY(function)
ADD_SUBDIRECTORY(gadget)
ADD_SUBDIRECTORY(settings)
ADD_SUBDIRECTORY(udc)
ADD_SUBDIRECTORY(base)

SET(MAIN_SRC main.c)

ADD_EXECUTABLE(${PROJECT_NAME} ${MAIN_SRC})

TARGET_LINK_LIBRARIES( gt
	base
	udc
	config
	function
	gadget
	settings
	${pkgs_LDFLAGS}
)

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})


cmake_minimum_required(VERSION 2.8)

#project name
PROJECT(gt)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/base/include)

SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")

ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")

SET(PKG_MODULES
        libusbg
	glib-2.0
	gio-2.0
)

INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})

FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Wall")

ADD_SUBDIRECTORY(config)
ADD_SUBDIRECTORY(function)
ADD_SUBDIRECTORY(gadget)
ADD_SUBDIRECTORY(settings)
ADD_SUBDIRECTORY(udc)
ADD_SUBDIRECTORY(base)

SET(MAIN_SRC main.c)

ADD_EXECUTABLE(${PROJECT_NAME} ${MAIN_SRC})

TARGET_LINK_LIBRARIES( gt
	base
	udc
	config
	function
	gadget
	settings
	${pkgs_LDFLAGS}
)

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})


Add glib2 to build requirements
build: Add glib2 to build requirements

glib2 will be used by d-bus code.

Change-Id: Id6efeb10fbaebd990307e1f3fc9d1233733e6cb4
Signed-off-by: Karol Lewandowski <8fb8916c55d06d2ab80c72f8c4561ece4e86f62e@samsung.com>
