]> granicus.if.org Git - libexpat/commitdiff
CMake: Fix ninja support
authorSebastian Pipping <sebastian@pipping.org>
Mon, 15 Aug 2016 16:39:28 +0000 (18:39 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Mon, 15 Aug 2016 16:39:28 +0000 (18:39 +0200)
expat/CMakeLists.txt

index 04d08c959b2d1665aa3614956a9fd361fdbcb1b9..4e6ce31b114f08305be00504debfc087142016a6 100755 (executable)
@@ -112,7 +112,13 @@ if(BUILD_tools AND NOT WINCE)
     target_link_libraries(xmlwf expat)\r
     install(TARGETS xmlwf DESTINATION bin)\r
     if(BUILD_doc)\r
-        add_custom_command(TARGET expat PRE_BUILD COMMAND $(MAKE) -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1)\r
+        if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")\r
+            set(make_command "$(MAKE)")\r
+        else()\r
+            set(make_command "make")\r
+        endif()\r
+\r
+        add_custom_command(TARGET expat PRE_BUILD COMMAND "${make_command}" -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1)\r
         install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1)\r
     endif()\r
 endif(BUILD_tools AND NOT WINCE)\r