 cmake_minimum_required(VERSION 2.8)


LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake")
SET(AVIDEMUX_TOP_SOURCE_DIR   "${CMAKE_CURRENT_SOURCE_DIR}/../../")
INCLUDE(admConfigHelper)
INCLUDE(admCheckRequiredLibs)
INCLUDE(admConfigSummary)

INCLUDE_DIRECTORIES( "${AVIDEMUX_TOP_SOURCE_DIR}/avidemux_core/ADM_core/include")
INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}")

FIND_PACKAGE(PkgConfig)

INCLUDE(admCheckFreeType)
checkFreeType()

IF(USE_FREETYPE)
	SET(SRCS ADM_vidFont.cpp fontgen.cpp )
	ADD_EXECUTABLE(fontGen ${SRCS})
	ADD_DEFINITIONS(${LIBICONV_DEFINITIONS})
	ADD_SOURCE_CFLAGS(ADM_vidFont.cpp       "${FREETYPE2_CFLAGS}" )
	ADD_SOURCE_CFLAGS(fontgen.cpp  "${FREETYPE2_CFLAGS}" )
	
	#TARGET_LINK_LIBRARIES(fontGen "${FREETYPE2_LDFLAGS} ${LIBICONV_LIBRARY_DIR}")
	TARGET_LINK_LIBRARIES(fontGen freetype)

ENDIF(USE_FREETYPE)
