#    qlscribe - Qt based application to print lightScribe discs
#
#    Copyright (C) 2009 Vyacheslav Kononenko <vyacheslav@kononenko.net>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#
#    $Id$ 

FIND_PACKAGE(Qt6 6.5 REQUIRED COMPONENTS Core Gui Widgets DBus)

SET( QLSCRIBE_SRCS main.cpp mainwindow.cpp qcdscene.cpp qcdview.cpp
     qdialogpixmap.cpp qdialogroundtext.cpp qdialogtext.cpp qlightroundtextitem.cpp 
     qlightscribe.cpp qshapefactory.cpp qlighttextitem.cpp qlightpixmapitem.cpp 
     qdialogprint.cpp qdialogprogress.cpp qdialogcdproperties.cpp qconsoleprintprogress.cpp
     qdialogsettings.cpp previewinjector.cpp )

SET( QLSCRIBE_UIS qdialogtext.ui qdialogroundtext.ui qdialogpixmap.ui
     qdialogprint.ui qdialogprogress.ui qdialogcdproperties.ui qdialogsettings.ui )

ADD_DEFINITIONS( -Wall )

CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/qlscribe.h.in ${CMAKE_CURRENT_BINARY_DIR}/qlscribe.h @ONLY )

SET_SOURCE_FILES_PROPERTIES(lightscribe.xml PROPERTIES INCLUDE qlightscribe.h)
QT6_ADD_DBUS_INTERFACE(QLSCRIBE_DBUS_SRCS lightscribe.xml lightscribe_interface)

INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )

ADD_EXECUTABLE(qlscribe ${QLSCRIBE_SRCS} ${QLSCRIBE_UIS}
                        ${QLSCRIBE_DBUS_SRCS} ../resources/qlscribe.qrc)

TARGET_LINK_LIBRARIES(qlscribe PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets Qt6::DBus)

INSTALL( TARGETS qlscribe 
         DESTINATION bin )
