diff --git a/.gitignore b/.gitignore index 72704c2..fd1ec68 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,5 @@ build/ *.sdf *.opensdf *.aps -CMake* -*.cmake .DS_Store *~ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..08118ee --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 2.8) + +project(diff-match-patch-c) + +set(LIBDMP_DEPS_INSTALL ${PROJECT_BINARY_DIR}/install) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBDMP_DEPS_INSTALL}/lib/) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBDMP_DEPS_INSTALL}/lib) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) + +add_subdirectory(src) +add_subdirectory(include) +add_subdirectory(test) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..b5ca0f4 --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1 @@ +install(FILES dmp.h DESTINATION include) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..fc0447b --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(dmp STATIC dmp_pool.c dmp.c) +install(TARGETS dmp DESTINATION lib) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..a7e553d --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(dump_test dmp_test_internals.c dmp_test.c) +target_link_libraries(dump_test dmp)