Eric Haszlakiewicz
6460446aa6
Switch to building a dynamic lib by default. Tweak language in the README.md slightly. Inspired by PR#452.
2018-12-11 20:59:08 -05:00
Ivan Romanov
ba5a02e8a9
Allow use json-c cmake as subproject
...
Now json-c can be bundled to any cmake-based project and used with
couple lines of code:
add_subdirectory(json-c EXCLUDE_FROM_ALL)
target_link_libraries(MyProject json-c)
2018-10-20 10:50:15 +05:00
Eric Haszlakiewicz
994e6c1f60
Re-add creation and installation of the json-c.pc file to the cmake build.
2018-09-01 15:06:14 -04:00
changyong guo
08c8231cc8
fix c flag loss during cmake building
2018-08-14 13:52:18 +08:00
Unmanned Player
f2e991a341
The real CMake support
...
This patch provides a CMakeLists.txt file to build JSON-C library without relying on auto-tools support. This makes the build a bit more portable and cleaner.
It can detect headers and symbols and generate config.h header file based on those detections. It cannot yet handle ctest(1) as the testing itself depends on comparing the output against files. Testing would need some creative abuse of CMake :) This will be provided a few patches later and may possibly involve refactoring test cases.
The patch has been tested on GCC 4.8.5 (Linux), GCC 7.2.0 (MinGW) and Microsoft Visual C++ 16.0 (2010?) locally. Also, compiles correctly on Travis CI and AppVeyor without errors.
2018-07-24 08:06:13 +10:00
Alexander Dahl
901d59b29f
cmake: Bump required version
...
Using 'project(foo VERSION 1.0)' requires CMake 3.0, the VERSION option
is not part of CMake 2.8.7, see:
* https://cmake.org/cmake/help/v2.8.7/cmake.html#command:project
* https://cmake.org/cmake/help/v3.0/release/3.0.0.html#commands
The property C_STANDARD was introduced with CMake 3.1, see:
* https://cmake.org/cmake/help/v3.1/release/3.1.0.html#properties
Signed-off-by: Alexander Dahl <post@lespocky.de >
2018-07-12 21:25:38 +02:00
Eric Haszlakiewicz
3df1f98b4a
Explain why we're not setting the output name for static libraries when on Windows.
2018-06-23 22:10:55 -04:00
Eric Haszlakiewicz
a056893263
Merge pull request #415 from sgbihu/master
...
Resolve windows name conflict
2018-06-23 22:08:25 -04:00
Keith Holman
37a2edf468
install json_object_iterator.h header file
...
When building the project using cmake then installing it. The
definitions in `json_object_iterator.h` are required but not installed
by the cmake install rule. This patch adds the `json_object_iterator.h`
file to the list of files to install.
Signed-off-by: Keith Holman <keith.holman@windriver.com >
2018-06-07 13:19:27 -04:00
Eric Haszlakiewicz
4414d068b3
Always create debug info (pdb file) even for release builds.
2018-05-27 21:50:57 -04:00
Liang, Gao
0b3616d580
Resolve windows name conflict
...
1. The windows dll will output the lib and dll, and rename the static
lib will have conflict on windows.
2. Delete rename code to dismiss the conflict.
2018-05-21 16:34:13 +08:00
Eric Haszlakiewicz
0631c37c7f
Update the master branch to version 0.13.99
2017-12-09 14:59:48 -05:00
Eric Haszlakiewicz
cf913621f1
Use cmake to create the json-c.pc file, as suggested by PR#362.
2017-10-09 13:16:00 -04:00
Eric Haszlakiewicz
579f0746f0
Issue #173 , follow up to using strtoll to allow this to work on older Windows environments: Use cmake to generate config.h from config.h.win32, including checking for strtoll with cmake, or fall back to _strtoi64 for older MSVC's.
...
Also, add a few missing files to the list of sources to build.
2017-10-03 22:50:29 -04:00
Eric Haszlakiewicz
66a77d129a
Split the list of cmake headers into public and private ones, and only install the public ones.
2017-09-17 21:27:07 -04:00
Eric Haszlakiewicz
7e608c5728
Issue #359 : Use consistent spacing in CMakeLists.txt
2017-09-06 23:42:38 -04:00
Haffon
837a249f01
set JSON_C_HEADERS full file name
2017-09-07 10:39:14 +08:00
Haffon
95e174e2fb
Merge pull request #1 from json-c/master
...
want to merge the original repository
2017-08-30 00:02:59 +08:00
Haffon
3141c3976b
1.make it can been compiled with Visual Studio 2010
...
2.replace json_object_get/put API with json_object_retain/release, as they operate the reference counter, and confused with array_list_get/put_idx.
3.replace array_list_get/put_idx API with array_list_get/insert to make them more clear to use.
2017-08-22 13:53:47 +08:00
topilski
0a99e7a5c1
Fix Mingw build
2017-07-30 07:37:17 +03:00
Eric Haszlakiewicz
7fd74fc7a3
Merge pull request #312 from Tailmon/master
...
Fix CMake Build process improved for MinGW and MSYS2
2017-07-08 21:25:48 -04:00
Alexandru Ardelean
8f6ecbf37b
build,cmake: set C_STANDARD 99 property to libjson-c-static
...
Apply the same property as to json-c.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-06-19 18:12:28 +03:00
Alexandru Ardelean
4fb2eefac2
build,cmake: rename libjson-c-static.a to libjson-c.a
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-06-19 18:08:45 +03:00
Alexandru Ardelean
4b5e39c89c
build,cmake: generate both static and shared libjson
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-05-03 12:00:38 +03:00
Alexandru Ardelean
cfbbb23141
build,cmake: add _GNU_SOURCE to CFLAGS
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-05-03 11:36:45 +03:00
Pablo Sanabria
2cda677d06
Fix CMake Build process for MinGW and MSYS2
...
This fix includes some fixes for config.h.win32 that was generating
some compiling errors on MinGW64 and also fix CMakeLists.txt in order to
give better support to MinGW and MSYS2
2017-03-26 23:14:37 -03:00
Alexandru Ardelean
47f32a76ef
vasprintf_compat.h: spin-off this compat header ; use math_compat.h as template
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-22 16:37:30 +02:00
Alexandru Ardelean
8cb86a583a
strdup_compat.h: re-spin this compat header ; use math_compat.h as template
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-22 16:37:29 +02:00
Emmanuele Bassi
7601f20d70
Revert "compat/strdup.h: move common compat check for strdup() to own file"
...
This reverts commit aaba8c1080 .
This commit breaks builddir != srcdir build, but, more importantly, it
also adds a dependency on a header, "config.h", which is not installed
and it's supposed to be private — since it's generated at configuration
time and it's not meant to be used by projects compiling against a
library.
2016-11-07 20:51:11 +00:00
Alexandru Ardelean
0e91183300
json_pointer: add first revision
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-04 09:51:36 +02:00
Alexandru Ardelean
aaba8c1080
compat/strdup.h: move common compat check for strdup() to own file
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-03 15:51:33 +02:00
Steve Gerbino
c5c93724fe
Changed CMake variables and adding output for debugging
2016-09-26 00:19:46 -04:00
Steve Gerbino
0c749d96ea
Target C99 standards to get rid of warnings
2016-09-26 00:09:55 -04:00
Steve Gerbino
928858457b
Modified the execute_process commands
2016-09-25 23:08:39 -04:00
Steve Gerbino
bdead39f63
Changed PROJECT_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR to fix building when used as external project
2016-09-25 22:32:35 -04:00
Steve Gerbino
702b42eaf3
Modified CMakeLists.txt to use autotools to generate configuration for Unix systems
2016-09-25 22:03:56 -04:00
Steve Gerbino
43afcc0d99
Lowered CMake required version so that Travis CI is able to build, moved include folder to include/json-c to match the behavior of autotools
2016-09-25 18:49:34 -04:00
Steve Gerbino
fe941a26a3
Trailing slash seems necessary in the install command to get contents
2016-09-25 15:04:05 -04:00
Steve Gerbino
ab7c09dc8e
Forget DESTINATION in CMake install command
2016-09-25 14:59:38 -04:00
Steve Gerbino
34b4a490b1
We need to also install the generated configuration files
2016-09-25 14:57:15 -04:00
Steve Gerbino
989e39d995
Fixed typo in CMakeList.txt FILES_MATCHING
2016-09-25 14:46:33 -04:00
Steve Gerbino
e2ee223dc2
Added install instructions for CMake
2016-09-25 14:42:14 -04:00
Steve Gerbino
69f018c49e
Resolves json-c/json-c#271 by adding MacOS configuration files and modifies CMakeLists.txt to use them
2016-09-25 02:14:57 -04:00
Randy Armstrong
c5b5a984cd
Add Cmakefile
2016-08-24 22:49:16 -04:00