Permalink
Browse files

Add cmake infrastructure.

  • Loading branch information...
1 parent eee3ea1 commit 72456c2679dfbe8ff0e079bb39f72e75a4b01ee7 @pcapriotti committed Jun 28, 2009
Showing with 65 additions and 7 deletions.
  1. +1 −0 .gitignore
  2. +17 −0 CMakeLists.txt
  3. +3 −3 kaya
  4. +5 −0 lib/CMakeLists.txt
  5. +20 −0 lib/ext/CMakeLists.txt
  6. +10 −0 lib/kaya.desktop
  7. +5 −4 lib/kaya.rb
  8. +4 −0 main.rb
View
@@ -1,3 +1,4 @@
*~
.#*
\#*#
+build
View
@@ -0,0 +1,17 @@
+project(kaya)
+cmake_minimum_required(VERSION 2.6)
+
+find_package(KDE4 REQUIRED)
+include(KDE4Defaults)
+add_subdirectory(lib)
+
+
+configure_file(main.rb main.rb)
+
+install(DIRECTORY lib DESTINATION ${DATA_INSTALL_DIR}/kaya
+ PATTERN "*rc" EXCLUDE
+ PATTERN "*.desktop" EXCLUDE)
+install(FILES ${PROJECT_BINARY_DIR}/main.rb
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ RENAME kaya)
View
6 kaya
@@ -1,4 +1,4 @@
-#!/bin/bash
-RUBY=/usr/bin/ruby
+#!/usr/bin/env ruby
+require 'lib/kaya.rb'
-$RUBY lib/kaya.rb $@
+start_kaya if __FILE__ == $0
View
@@ -0,0 +1,5 @@
+add_subdirectory(ext)
+
+install(FILES kaya.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kaya)
+install(FILES kaya.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+install(FILES kayaui.rc DESTINATION ${DATA_INSTALL_DIR}/kaya)
View
@@ -0,0 +1,20 @@
+find_package(Qt4 REQUIRED)
+find_package(Ruby REQUIRED)
+
+add_definitions(${QT_DEFINITIONS})
+include_directories(${QT_INCLUDES})
+
+
+set(src extensions.cpp expblur.cpp)
+qt4_wrap_cpp(src extensions.h)
+add_library(extensions SHARED ${src})
+set_target_properties(extensions PROPERTIES PREFIX "")
+
+
+message("lib: ${QT_QTGUI_LIBRARY}")
+target_link_libraries(extensions ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+
+# install(TARGETS ksimple DESTINATION bin)
+
+
+
View
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Kaya
+GenericName=Generic Board Game
+Exec=kaya %i %m -caption "%c"
+Icon=kaya
+Type=Application
+DocPath=kaya/kaya.html
+Comment=A generic board game application.
+Terminal=false
View
@@ -1,11 +1,12 @@
+#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__))
require 'qtutils'
require 'mainwindow'
require 'plugins/loader'
require 'games/all'
-if $0 == __FILE__
- DEFAULT_GAME = :chess
+def start_kaya
+ default_game = :chess
app = KDE::Application.init(
:version => '0.1',
@@ -25,13 +26,13 @@
name = args.arg(0)
g = Game.get(name.to_sym)
unless g
- warn "No such game #{name}. Defaulting to #{DEFAULT_GAME}"
+ warn "No such game #{name}. Defaulting to #{default_game}"
nil
else
g
end
end
- game ||= Game.get(DEFAULT_GAME)
+ game ||= Game.get(default_game)
plugin_loader = PluginLoader.new
main = MainWindow.new(plugin_loader, game)
View
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+require '${DATA_INSTALL_DIR}/kaya/lib/kaya.rb'
+
+start_kaya if __FILE__ == $0

0 comments on commit 72456c2

Please sign in to comment.