cmake_minimum_required(VERSION 2.8)
project (ImageLabeler)

FIND_PACKAGE(Qt4 REQUIRED)

# The version number.
SET (ImageLabeler_VERSION_MAJOR 1)
SET (ImageLabeler_VERSION_MINOR 1)

SET(ImageLabeler_SRC "${ImageLabeler_SOURCE_DIR}/src")
SET(ImageLabeler_INC "${ImageLabeler_SOURCE_DIR}/include")
SET(ImageLabeler_FORMS ui/ImageLabeler.ui)

SET(QT_USE_QTXML TRUE)

# recurse over files
FILE(GLOB_RECURSE ImageLabeler_SOURCES ${ImageLabeler_SRC}/*.cpp)
FILE(GLOB_RECURSE ImageLabeler_HEADERS ${ImageLabeler_INC}/*.h)

QT4_WRAP_CPP(ImageLabeler_HEADERS_MOC ${ImageLabeler_HEADERS})
QT4_WRAP_UI(ImageLabeler_HEADERS_FORMS ${ImageLabeler_FORMS})

INCLUDE_DIRECTORIES(${ImageLabeler_INC})

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

# add the executable
ADD_EXECUTABLE (ImageLabeler ${ImageLabeler_SOURCES} ${ImageLabeler_HEADERS_MOC} ${ImageLabeler_HEADERS_FORMS})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

TARGET_LINK_LIBRARIES(ImageLabeler ${QT_LIBRARIES})

# add the install targets
install (TARGETS ImageLabeler DESTINATION bin)

