A CMake project consists of CMakeLists.txt files. The primary file in the
root of the project specifies global project information and
configuration. CMakeLists.txt files in subdirectories can contain
configuration for how to build to binaries.
This configuration minimal configuration only builds lib/cdt as a shared
(dynamic) library. CMake supports out of source builds, which is the
recommended way of building:
mkdir build
cd build
cmake ..
cmake --build .
The `cmake ..` generates the build files. On Unix based systems, it
gerenates makefiles, on Windows it generates Visual Studio projects. The
used generated can be specified with -G.
## Binaries
tests/unit_tests/lib/common/command_line
+# Cmake build folder
+build/**
+
# Folders and files generated by Visual Studio builds
**/Debug/**
**/Release/**
--- /dev/null
+cmake_minimum_required (VERSION 2.8 FATAL_ERROR)
+
+project (Graphviz)
+
+add_subdirectory(lib)
--- /dev/null
+add_subdirectory(cdt)
--- /dev/null
+add_definitions(-D_BLD_cdt)
+
+include_directories(.)
+
+add_library(cdt SHARED
+ # Header files
+ cdt.h
+ dthdr.h
+
+ # Source files
+ dtclose.c
+ dtdisc.c
+ dtextract.c
+ dtflatten.c
+ dthash.c
+ dtlist.c
+ dtmethod.c
+ dtopen.c
+ dtrenew.c
+ dtrestore.c
+ dtsize.c
+ dtstat.c
+ dtstrhash.c
+ dttree.c
+ dtview.c
+ dtwalk.c
+
+ # Link definition file for Windows
+ cdt.def
+)