From b419a6e952b64c00b81363704d33a8ea848c0656 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 15 Aug 2016 18:39:28 +0200 Subject: [PATCH] CMake: Fix ninja support --- expat/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 04d08c95..4e6ce31b 100755 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -112,7 +112,13 @@ if(BUILD_tools AND NOT WINCE) target_link_libraries(xmlwf expat) install(TARGETS xmlwf DESTINATION bin) if(BUILD_doc) - add_custom_command(TARGET expat PRE_BUILD COMMAND $(MAKE) -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1) + if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") + set(make_command "$(MAKE)") + else() + set(make_command "make") + endif() + + add_custom_command(TARGET expat PRE_BUILD COMMAND "${make_command}" -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1) install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1) endif() endif(BUILD_tools AND NOT WINCE)