CMake: Fix ninja support

This commit is contained in:
Sebastian Pipping 2016-08-15 18:39:28 +02:00
parent add34368c6
commit b419a6e952

View File

@ -112,7 +112,13 @@ if(BUILD_tools AND NOT WINCE)
target_link_libraries(xmlwf expat) target_link_libraries(xmlwf expat)
install(TARGETS xmlwf DESTINATION bin) install(TARGETS xmlwf DESTINATION bin)
if(BUILD_doc) 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) install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1)
endif() endif()
endif(BUILD_tools AND NOT WINCE) endif(BUILD_tools AND NOT WINCE)