@@ -30,45 +30,49 @@ If JsonCpp was build as a dynamic library on Windows, then your project needs to
30
30
define the macro ` JSON_DLL ` .
31
31
32
32
33
- Building/Testing with new CMake build system
34
- --------------------------------------------
35
-
36
- CMake is a C++ Makefiles/Solution generator that can be downloaded from:
37
- http://www.cmake.org
38
-
39
- It is usually available on most Linux system as package. On Ubuntu:
40
- sudo apt-get install cmake
41
-
42
- Notes that python is also required to run JSON reader/writer tests. If
33
+ Building and testing with new CMake
34
+ -----------------------------------
35
+
36
+ [ CMake] [ ] is a C++ Makefiles/Solution generator. It is usually available on most
37
+ Linux system as package. On Ubuntu:
38
+
39
+ sudo apt-get install cmake
40
+
41
+ [ CMake ] : http://www.cmake.org
42
+
43
+ Note that Python is also required to run the JSON reader/writer tests. If
43
44
missing, the build will skip running those tests.
44
-
45
+
45
46
When running CMake, a few parameters are required:
46
- - a build directory where the makefiles/solution are generated. It is
47
- also used to store objects, libraries and executables files.
48
- - the generator to use: makefiles or Visual Studio solution? What version
49
- or Visual Studio, 32 or 64 bits solution?
50
-
51
- Generating solution/makefiles using cmake-gui:
52
- - Makes "source code" points the source directory
53
- - Makes "where to build the binary" points to the directory to use for
54
- the build.
55
- - Click on the "Grouped" check box
56
- - Review JsonCpp build option (tick JSONCPP_LIB_BUILD_SHARED to build as
57
- a dynamic library)
58
- - Click configure button at the bottom, then the generate button.
59
- - The generated solution/makefiles can be found in the binary directory.
60
-
47
+
48
+ * a build directory where the makefiles/solution are generated. It is also used
49
+ to store objects, libraries and executables files.
50
+ * the generator to use: makefiles or Visual Studio solution? What version or
51
+ Visual Studio, 32 or 64 bits solution?
52
+
53
+ Steps for generating solution/makefiles using ` cmake-gui ` :
54
+
55
+ * Make "source code" point to the source directory.
56
+ * Make "where to build the binary" point to the directory to use for the build.
57
+ * Click on the "Grouped" check box.
58
+ * Review JsonCpp build options (tick ` JSONCPP_LIB_BUILD_SHARED ` to build as a
59
+ dynamic library).
60
+ * Click the configure button at the bottom, then the generate button.
61
+ * The generated solution/makefiles can be found in the binary directory.
62
+
61
63
Alternatively, from the command-line on Unix in the source directory:
62
-
63
- mkdir -p ../build/debug
64
- cd ../build/debug
65
- cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=OFF -G "Unix Makefiles" ../../jsoncpp-src
66
- make
67
-
68
- Running "cmake -h" will display the list of available generators (passed as -G option).
69
-
70
- By default CMake hides compilation command-line. This can be modified by specifying:
71
- -DCMAKE_VERBOSE_MAKEFILE=true when generating makefiles.
64
+
65
+ mkdir -p ../build/debug
66
+ cd ../build/debug
67
+ cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=OFF -G "Unix Makefiles" ../../jsoncpp-src
68
+ make
69
+
70
+ Running ` cmake - ` " will display the list of available generators (passed using
71
+ the ` -G ` option).
72
+
73
+ By default CMake hides compilation commands. This can be modified by specifying
74
+ ` -DCMAKE_VERBOSE_MAKEFILE=true ` when generating makefiles.
75
+
72
76
73
77
Building/Testing with the legacy build system based on SCons
74
78
------------------------------------------------------------
0 commit comments