Skip to content

Commit

Permalink
Initial code import.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaine committed Mar 23, 2012
0 parents commit 24373dd
Show file tree
Hide file tree
Showing 82 changed files with 10,803 additions and 0 deletions.
5 changes: 5 additions & 0 deletions AUTHORS
@@ -0,0 +1,5 @@
Jeremy Lainé <jeremy.laine@m4x.org>
* Principal developer of QDjango.

Mathias Hasselmann <mathias@openismus.com>
* Support for QDjangoQuerySet iterators.
16 changes: 16 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 2.6)

# Project and version
project(QDjango)
set(QDJANGO_VERSION 0.2.0)

find_package(Qt4 REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/db)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/http)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/script)

add_subdirectory(src)
if(NOT QDJANGO_DONT_USE_TESTS)
add_subdirectory(tests)
add_subdirectory(examples)
endif()
61 changes: 61 additions & 0 deletions README
@@ -0,0 +1,61 @@
QDjango

License
=======

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Requirements
============

On Debian
----------

$ sudo aptitude install cmake libqt4-dev libqt4-sql-sqlite

On Mac OS X
-----------

$ sudo port install cmake qt4-mac

Building QDjango
================

$ mkdir build
$ cd build
$ cmake ..
$ make

See platform specific notes for applicable cmake options.

On Mac OS X
-----------

If you are running MacOS/X and want to build specifically for i386 on an
x86_64 machine, invoke cmake as:

$ cmake .. -DCMAKE_CXX_FLAGS="-arch i386" -DLINK_FLAGS="-arch i386"

Cross compiling for win32
-------------------------

To cross compile for win32 on a Debian machine, install the libqt4-mingw32-dev
package from:

http://dev.jerryweb.org/debian/pool/main/

Then invoke cmake as:

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32.toolchain

20 changes: 20 additions & 0 deletions cmake/mingw32.toolchain
@@ -0,0 +1,20 @@
# specify system and cross compiler
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> --input-format rc --output-format coff -i <SOURCE> -o <OBJECT>")

# where is the target environment
set(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)

# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

# Qt 4
set(QT_HEADERS_DIR ${CMAKE_FIND_ROOT_PATH}/include/qt4)
set(QT_LIBRARY_DIR ${CMAKE_FIND_ROOT_PATH}/lib)
set(QT_PLUGINS_DIR ${CMAKE_FIND_ROOT_PATH}/lib/qt4)

0 comments on commit 24373dd

Please sign in to comment.