Commit Graph

67 Commits

Author SHA1 Message Date
Joakim Soderberg
913937c98d Added CMake config files.
This will simplify linking against the lib, both from the build-tree and
install-tree from other CMake projects.

CMakes find_package command uses these configs to locate the exported
targets for the library.

* Also changed so that all CMake options for the project are prepended
  with JANSSON_ so that there is no ambiguity when including this as a
  subdirectory in another CMake project.
2014-01-24 14:13:02 +01:00
Petri Lehtinen
b21cd65d30 Fix CMake build flags for MinGW 2014-01-16 08:03:05 +02:00
Petri Lehtinen
641002da37 jansson 2.5 2013-09-19 21:26:46 +03:00
cryptobiote
d9ee5a7f1b Update CMakeLists.txt 2013-06-25 09:36:11 -06:00
cryptobiote
19a19d1952 Adding option for MSVC for those who are linking statically. 2013-06-20 11:00:40 -06:00
Paul Harris
2fd66fab1a Adjust CMakeLists.txt and .def: add _d postfix onto jansson_d.lib/dll
Had to remove the "LIBRARY" line from jansson.def, which was optional,
and was overriding CMake's desire for a specific name.
2013-06-02 22:00:32 +08:00
Joakim Soderberg
54d86fb4a4 Create and install the pkg-config file jansson.pc for CMake.
Use the same jansson.pc.in file as the ./configure script does to generate the jansson.pc file for pkg-config. Also make an install rule for this.
2013-05-06 12:34:52 +00:00
Joakim Soderberg
8390c90a91 Added more detailed CMake documentation.
- Also added better FindSphinx support so that we can detect the version and not  have a fatal error if it's too old.
- Added support for building latex documentation with -DBUILD_LATEX. Off by default.
- Added suppor for building man pages with -DBUILD_MAN. On by default (unless sphins is too old to support it).
2013-04-24 14:14:00 +00:00
Joakim Soderberg
3000831365 Use -fPIC when possible.
So that we can link the library statically to shared libraries.
2013-04-18 09:25:17 +00:00
Petri Lehtinen
263fd0c9d3 Remove trailing whitespace 2013-03-14 22:18:21 +02:00
Petri Lehtinen
6db70f0301 cmake: Add stripped tests 2013-03-14 22:16:16 +02:00
Joakim Soderberg
650707fccc Moved *config.h.cmake to the cmake directory. 2013-03-07 18:38:47 +01:00
Joakim Soderberg
7214a222c7 Skip using a debug postfix with visual studio.
The output dir is different anyway, and this just makes it more
complicated to build projects that link to this, because they need
different link rules based on the build type.
2013-03-07 16:21:35 +01:00
Joakim Söderberg
81ce127048 Compile tests by default.
- Encourage actually using the unit tests by compiling them by default.
Set the WITHOUT_TESTS variable to build without instead...

- Changed comments to keep within 80 characters.
- Don't have a hard coded path for valgrind, simply assuem it's in the path instead (an OSX ports install puts it in /opt/local/bin for instance).
- Fixed building the shared lib.
2013-03-07 16:19:56 +01:00
Joakim Soderberg
e40d52c550 Consolidated the CMake project.
- Moved everything to one CMakeLists.txt
- Added support for the json_process test suites (instead of just the API
  tests).
- Changed to use the modified json_process version that does away with the
  environment variables (originally written by DanielT).
- Had to exclude "test_memory_funcs" on MSVC, since void pointer
  arithmetics are not allowed as it is done in secure_malloc and
  secure_free.
- Had to add a check for "ssize_t". This is not available on Windows and
  maybe on some other platforms (used in test_pack.c)
- Result from running ctest (The failure seems unrelated to CMake, it's
  just that the expected result is in a different order):
99% tests passed, 1 tests failed out of 121

Total Test time (real) =   1.31 sec

The following tests FAILED:
         24 - valid__complex-array (Failed)
2013-03-07 16:11:07 +01:00
Paul Harris
3d5bea5714 Fixes for cmake for MSVC2010 2013-03-07 16:06:38 +01:00
Paul Harris
3e03b07831 Add CMake build system.
Added multiple CMake-related files to project.
Supports building the library and the tests.
See CMakeLists.txt for notes on how it works.

I had to adjust 3 existing files in order to disable some configuration
that should be taken care of by cmake/automake anyway.

I also added jansson.def from a future jansson version,
to test cmake's support for .def files (which works fine).
2013-03-07 16:06:01 +01:00