project(qonjugatorcli)
cmake_minimum_required(VERSION 2.6)

### don't create the uninstall rule if this application is compiled as part of the Qonjugator package
if (qonjugator_compile_not_standalone)
	set(qonjugator_uninstall_rule_created TRUE)
endif (qonjugator_compile_not_standalone)

### include application defaults
include(../ConfigureDefaults.cmake)

### find the Qonjugator library and set some useful definitions
find_package(QonjugatorLib REQUIRED)
add_definitions(-DQT_NO_DEBUG -DQT_SHARED)
include_directories(${QONJUGATOR_INCLUDES})

add_definitions(-DAPPNAME=\"Qonjugator\" -DAPPVERSION=\"0.15\")

### include custom paths defined by the user
include(ConfigureCustom.cmake)

### tell the user where we will install everything
message("Qonjugator CLI Application")
message("   The application binary will be installed in ${QONJUGATOR_BINDIR}")
message("   The translations will be installed in ${QONJUGATOR_TRANSLATIONSDIR}")

### compile
set(qonjugatorcli_SRCS
    main.cpp)
qt4_add_translation(qonjugatorcli_TRANS
                    qonjugatorcli_es.ts
                    qonjugatorcli_fr.ts)

add_executable(qonjugatorcli
               ${qonjugatorcli_SRCS}
               ${qonjugatorcli_TRANS})
target_link_libraries(qonjugatorcli
                      ${QT_LIBRARIES} ${QONJUGATOR_LIBRARIES})

### install
install(TARGETS qonjugatorcli
        DESTINATION ${QONJUGATOR_BINDIR})
install(FILES ${qonjugatorcli_TRANS}
        DESTINATION ${QONJUGATOR_TRANSLATIONSDIR})
