############################################################################
#    Copyright (C) 2008-2009 by David Palacio                              #
#    dpalacio@uninorte.edu.co                                              #
#                                                                          #
#    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 3 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 Steet, Fifth Floor, Boston, MA  02111-1307, USA.          #
############################################################################

project(omaque)
# find_package(Ruby REQUIRED)
find_package(KDE4 REQUIRED)
add_subdirectory(generador_directorio)

add_custom_command(OUTPUT ui_settings.rb COMMAND rbuic4 -o ${CMAKE_CURRENT_BINARY_DIR}/ui_settings.rb ${CMAKE_CURRENT_SOURCE_DIR}/ui/settings.ui DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ui/settings.ui)
ADD_CUSTOM_TARGET(ui_settings ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ui_settings.rb)

set(reader_SRCS
main.rb
reader.rb
okularpart.rb
${CMAKE_CURRENT_BINARY_DIR}/ui_settings.rb
mainwindow.rc
)

install(FILES ${reader_SRCS} DESTINATION ${DATA_INSTALL_DIR}/omaque)
install(FILES omaque.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES omaque DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE )
kde4_install_icons( ${ICON_INSTALL_DIR} )

