From: Erwin Janssen Date: Mon, 19 Dec 2016 15:03:57 +0000 (+0100) Subject: Initial minimal CMake project X-Git-Tag: 2.42.0~213^2^2~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0ec9e44b5eda6219c4740b149d30a58f8687a83;p=graphviz Initial minimal CMake project 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. --- diff --git a/.gitignore b/.gitignore index 541b6962a..1f259d8f3 100644 --- a/.gitignore +++ b/.gitignore @@ -206,6 +206,9 @@ tests/**/difference/** ## Binaries tests/unit_tests/lib/common/command_line +# Cmake build folder +build/** + # Folders and files generated by Visual Studio builds **/Debug/** **/Release/** diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..4ce651d04 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required (VERSION 2.8 FATAL_ERROR) + +project (Graphviz) + +add_subdirectory(lib) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 000000000..650cb7bbe --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(cdt) diff --git a/lib/cdt/CMakeLists.txt b/lib/cdt/CMakeLists.txt new file mode 100644 index 000000000..36827c053 --- /dev/null +++ b/lib/cdt/CMakeLists.txt @@ -0,0 +1,30 @@ +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 +)