#################################################
#
#  (C) 2017 Slávek Banko
#  slavek (DOT) banko (AT) axis.cz
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

add_subdirectory( pics )

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_SOURCE_DIR}/arts/runtime
  ${CMAKE_BINARY_DIR}/arts/runtime
  ${CMAKE_BINARY_DIR}
  ${ARTS_INCLUDE_DIRS}
  ${TQT_INCLUDE_DIRS}
  ${TDE_INCLUDE_DIR}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${ARTS_LIBRARY_DIRS}
)


##### artsbuilder (executable) ##################

tde_add_executable( artsbuilder AUTOMOC
  SOURCES
    autorouter.cpp main.cpp propertypanelbase.ui
    module.cpp propertypanel.cpp structure.cpp
    retrievedlg.cpp createtool.cpp structureport.cpp
    drawutils.cpp scomponent.cpp portposdlg.cpp
    menumaker.cpp session.cpp dirmanager.cpp mwidget.cpp
    execdlg.cpp qttableview.cpp interfacedlg.cpp
  LINK
    tdecore-shared tdeui-shared tdeio-shared artsbuilder-shared artskde-shared
    mcop qtmcop artsflow_idl soundserver_idl pthread
  DEPENDENCIES
    arts_builder_headers
  DESTINATION ${BIN_INSTALL_DIR}
)

add_custom_target(
  arts_builder_headers
  DEPENDS
    ${CMAKE_CURRENT_BINARY_DIR}/propertypanelbase.h
)


##### other data ################################

install( FILES artsbuilder.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES x-artsbuilder.desktop DESTINATION ${MIME_INSTALL_DIR}/application )
install( FILES artsbuilderui.rc DESTINATION ${DATA_INSTALL_DIR}/artsbuilder )
