-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathREADME
111 lines (81 loc) · 3.04 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
About
=====
CMakeQt, a cross-platform CMake build system template for C++/Qt based projects.
Copyright Rohit Yadav <[email protected]>, 2009-2015
Feel free to use and modify it according to your project. For reporting bugs,
feature requests and just to say hi, contact the author.
WWW
===
https://github.com/bhaisaab/cmakeqt
https://www.ohloh.net/p/cmakeqt
History
=======
Initially the build system was just for VLMC, but I thought why not make a
build system template that anyone can hack easily and use in their own projects,
thus CMakeQt!
Some projects that use CMakeQt (or parts of source code)
==============================
- VLMC: http://git.videolan.org/?p=vlmc.git;a=summary
- CernVM Installer: http://cernvm.cern.ch/portal/cernvm-installer
- Blender: http://www.blender.org
- Phonon-backend-vlc: http://gitorious.org/phonon/phonon-vlc
- Tano Player: http://sourceforge.net/projects/tano/
- Graffiti: https://github.com/bhaisaab/graffiti
Source
======
Github: http://github.com/bhaisaab/cmakeqt
Grab the latest source:
git clone git://github.com/bhaisaab/cmakeqt.git
Translations
============
Languages that only needed to be shipped can be selected using LANGS, for example:
cmake -DLANGS="en;fr" ..
To create ts files, either simply do a `make lupdate` or cd to ts/ folder and do:
cd ts
lupdate ../src/* -ts template.ts
Now, send this template to the translators and ask them to rename and send you the file as cmakeqt_<lang-token>.ts;
where, lang token can be fr_FR etc.
If you add a new language translation, simple add the token to the lang list in ts/CMakeLists.txt
For testing I've added a french translation, which is explicitly ran in src/main.cpp
Hack hack hack!
Building
========
mkdir build && cd build
cmake .. && make
The binary will be created in <build-folder>/bin
Packaging
=========
1. On Linux:
make package
To force deb:
cpack -G DEB
To force rom:
cpack -G RPM
2. On Mac: (gcc, g++, make, cmake, qt 4.6+ etc. must be installed...)
cd contribs
sh contribs-mac.sh
This will by default create a Mac Bundle, vlmc.app in /build/bin
To create a dmg image:
Uncomment #dmg in /src/CMakeLists.txt, at the end of the file.
and follow the build process, the dmg will be created in /build/bin
3. To cross-compile and package on linux for Windows: (mingw, wine, nsis must be installed...)
cd contribs
sh contribs.sh
cd ..
mkdir win32 && cd win32
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-win32.cmake -DQT_MOC_EXECUTABLE=../contribs/tools/moc.exe ..
make
make installer
This will create an .exe installer in /win32/bin
Distribution via Launchpad
==========================
Launchpad.net provides PPA facility for distribution of debian builds.
The /debian folder holds debian package building rules.
You build and upload your source pkgs by:
debuild -k<pgp key ID>
debuild -k<pgp key ID> -S -sa # creates only the source pkg
dput ppa:<ppa-id>/<pkg> <source.changes>
To add/install the pkg, one can do:
sudo add-apt-repository ppa:<ppa-id>/<pkg>
sudo apt-get update
sudo apt-get install <pkg>