Commit Graph

35 Commits

Author SHA1 Message Date
Vicent Marti
678e9e045b build: Move OS-specific compat to their own folders 2011-07-03 13:33:43 +02:00
Kirill A. Shutemov
932d1baf29 cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-01 18:02:56 +02:00
Tim Harder
1f4f4d1704 cmake: Use system zlib if found on non-Windows systems 2011-07-01 17:41:46 +02:00
Vicent Marti
ec62685345 zlib: Declare preprocessor directives at build time 2011-07-01 17:34:27 +02:00
Vicent Marti
17d523041d build: Simplify build structure
This will make libgit2 more suitable for embedding.
2011-07-01 17:26:23 +02:00
Vicent Marti
b2cef77ccf common: Force 64 bit fileops at compile time 2011-06-30 22:28:19 +02:00
Carlos Martín Nieto
e233fa6f17 Bring back GCC flags
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 16:37:04 +02:00
Vicent Marti
8172dd4383 cmake: Do not pass /Tc to MSVC 2011-06-23 22:45:09 +02:00
Vicent Marti
f0890fccf9 cmake: Build shared library by default 2011-06-17 19:40:51 +02:00
Vicent Marti
e01f7f642c windows: Disable Runtime checks
Runtime checks are asserting on the embedded ZLib code because of
truncation (see zlib/trees.c:218). This is not good or pretty, but I'm
wary about patching the ZLib code even more.

There are two ways to fix this:

	- Patch the ZLib code, and start storing a diff/patchset on
	how does our version of ZLib differ from the original one, so we can
	be more or less on sync when new version of ZLib.

	- Go back to ZLib as an external dependency, which is np for *NIX
	users but annoying as dicks for Windows users.

THINK HARD
2011-06-17 19:40:06 +02:00
3d96996da6 Fix misleading comment in CMake build script 2011-06-16 08:10:25 -07:00
Vicent Marti
f64586fab6 Add CTest support for CI 2011-06-14 20:00:06 +02:00
Em
904125075e Port MSVC specific Waf compilation flags to CMake and remove dynamic dependence to msvcr100.dll on Windows
The '/MT' and '/MTd' flags replace the dynamic link to 'msvcr100.dll' with a static link to 'libcmt.lib'. This has the nice effect to ease the deployment of libgit2 by removing the dependence on 'msvcr100.dll' which is not deployed by default on Windows.
2011-06-14 17:40:18 +02:00
Vicent Marti
953e1f9366 build: Cleanup CMake 2011-06-14 17:40:18 +02:00
Vicent Marti
1a7b52dcc9 build: Drop waf support
Goodbye Waf. It's been a long ride.
2011-06-14 17:40:17 +02:00
Vicent Marti
b023321669 Remove custom backends
All the custom backend code will be moved to a separate project,
	together with the new MySQL backend.
2011-06-14 17:40:17 +02:00
Vicent Marti
70236bab2d Update CMakeLists.txt to support threadsafe 2011-03-21 19:39:06 +02:00
Vicent Marti
9f81a37aa4 Define NO_GZIP in zconf.h instead of at compile time 2011-03-16 23:02:31 +02:00
Vicent Marti
ab6a3d3de5 Add ZLib as a built-in dependency
I don't know if this is good or bad. This lets libgit2 compile cleanly
on any platforms without any external dependencies, but adds a little
bit of bloat...

Let's test this out and see what happens.
2011-03-15 03:29:20 +02:00
Vicent Marti
c3a41e5f14 Fix compilation when using CMake in Windows
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 22:01:15 +02:00
Vicent Marti
71d33382a7 Move the external includes folder from src to include
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 20:23:53 +02:00
Przemyslaw Pawelczyk
20e83aa4ef Further improve SQLite support for CMake users.
Unfortunately previous commit was only a partial fix, because it broke
SQLite support on platforms w/o pkg-config, e.g. Windows. To be honest
I just forgot about messy Windows.

Now if there is no pkg-config, then user must provide two variables:
SQLITE3_INCLUDE_DIRS and SQLITE3_LIBRARIES if (s)he wants to use SQLite
backend. These variables are added to cmake-gui for her/his convenience
unless they are set by FindPkgConfig module.

pkg-config should work also now in Cygwin.
2011-02-08 13:14:19 +01:00
Przemyslaw Pawelczyk
911fd45792 Fix SQLite support for CMake users.
FindPkgConfig obviously uses pkg-config's output for setting convenient
variables such as <PREFIX>_LIBRARIES or <PREFIX>_INCLUDE_DIRS. It also
sets <PREFIX>_FOUND to 1 if <PREFIX> module exists.

So why checking for SQLITE3_FOUND is better than (SQLITE3_LIBRARIES AND
SQLITE3_INCLUDE_DIRS)? Apart from obvious readability factor, latter
condition has strong assumption that both variables are filled with
appropriate paths, which is unjustifiable unless you add another
assumptions...

pkg-config by default strips -I/usr/include from Cflags and -L/usr/lib
from Libs if some environment variables are not set,
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and PKG_CONFIG_ALLOW_SYSTEM_LIBS
respectively. This behavior is sane, because it prevents polluting the
compilation and linking commands with superfluous entries.

In debian SQLITE3_INCLUDE_DIRS is empty for instance.

Remark for developers:
Always check commands invoked by CMake after changing CMakeLists.txt.

    VERBOSE=1 cmake --build .
2011-02-08 00:30:08 +01:00
Vicent Marti
9d1dcca229 Add proper version management
We now have proper sonames in Mac OS X and Linux, proper versioning on
the pkg-config file and proper DLL naming in Windows.

The version of the library is defined exclusively in 'src/git2.h'; the build scripts
read it from there automatically.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-07 10:35:58 +02:00
Vicent Marti
7a689719bd Merge branch 'master' of https://github.com/saschpe/libgit2 into saschpe-master
Conflicts:
	CMakeLists.txt
2011-02-07 09:14:45 +02:00
Vicent Marti
f443a8793f Compile the SQLite backend with CMake too
Use pkg-config to find the library in Unix systems. In Win32, just set
manually the path to your libraries.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-07 08:47:50 +02:00
Vicent Marti
b02c371ee9 Build the new test file with CMake too
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-02 02:31:58 +02:00
Sascha Peilicke
2d5ef6ad0d Set proper shared library soname. 2011-01-18 21:35:57 +01:00
Peter Drahoš
bfe0658ec6 Update install info and test resource path handling 2010-12-12 00:20:43 +02:00
Peter Drahoš
032db4d015 Reflect the recent changes in header organization (CMake) 2010-12-12 00:20:31 +02:00
Peter Drahos
5b8bb8e7c6 Minor modifications for MinGW/Cygwin compatibility. 2010-12-12 00:20:31 +02:00
Peter Drahoš
6484008297 Fix case sensitivity issue. 2010-12-12 00:20:31 +02:00
Peter Drahoš
73c46d539f Add basic testing support and options to specify install paths 2010-12-12 00:20:17 +02:00
Peter Drahoš
7cbdaf7ffa Add option to select sha1 type in CMake build 2010-12-12 00:20:08 +02:00
Peter Drahoš
583cf1696a Add optional CMake build script. 2010-12-12 00:19:49 +02:00