diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 8c65a536..be8078a8 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -249,6 +249,9 @@ add_custom_command( ) + +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${BUILDDIR}") + # Invokes sphinx-build and prints the given messages when completed function(sphinxbuild builder) set(echo_commands) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 0cfdc9b3..8bdfbb3d 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,11 +1,10 @@ # EXTRA_DIST = cnghttp2.pxd nghttp2.pyx if(ENABLE_PYTHON_BINDINGS) - add_custom_target(python ALL COMMAND "${PYTHON_EXECUTABLE}" setup.py build VERBATIM - DEPENDS nghttp2.c + DEPENDS nghttp2.c nghttp2 ) configure_file(install-python.cmake.in install-python.cmake ESCAPE_QUOTES @ONLY) @@ -17,6 +16,12 @@ if(ENABLE_PYTHON_BINDINGS) VERBATIM DEPENDS nghttp2.pyx ) + + # Instead of calling "setup.py clean --all", this should do... + set_directory_properties(PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES "build;python_nghttp2.egg-info" + ) + ## This works also, except that the installation target is missing... # include(UseCython) # cython_add_module(python_nghttp2 nghttp2.pyx) diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index cb88533e..7578a857 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -61,6 +61,8 @@ if(ENABLE_THIRD_PARTY) ) add_dependencies(mruby-lib mruby) - # XXX clean ${CMAKE_CURRENT_BINARY_DIR}/mruby/build + set_directory_properties(PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES mruby/build + ) endif() endif()