Get CMake version requirement down again

This commit is contained in:
Learath 2020-06-16 19:33:57 +03:00
parent 1d4ea6c41b
commit ef89e9a300

View file

@ -335,7 +335,7 @@ if(UPNP)
find_package(Miniupnpc) find_package(Miniupnpc)
endif() endif()
find_package(Pnglite) find_package(Pnglite)
find_package(Python3) find_package(PythonInterp 3)
find_package(SDL2) find_package(SDL2)
if(VIDEORECORDER) if(VIDEORECORDER)
find_package(FFMPEG) find_package(FFMPEG)
@ -415,7 +415,7 @@ if(UPNP)
show_dependency_status("Miniupnpc" MINIUPNPC) show_dependency_status("Miniupnpc" MINIUPNPC)
endif() endif()
show_dependency_status("Pnglite" PNGLITE) show_dependency_status("Pnglite" PNGLITE)
show_dependency_status("PythonInterp" Python3_Interpreter) show_dependency_status("PythonInterp" PYTHONINTERP)
show_dependency_status("SDL2" SDL2) show_dependency_status("SDL2" SDL2)
if(VIDEORECORDER) if(VIDEORECORDER)
show_dependency_status("FFmpeg" FFMPEG) show_dependency_status("FFmpeg" FFMPEG)
@ -429,7 +429,7 @@ endif()
if(CLIENT AND NOT(CURL_FOUND)) if(CLIENT AND NOT(CURL_FOUND))
message(SEND_ERROR "You must install Curl to compile DDNet") message(SEND_ERROR "You must install Curl to compile DDNet")
endif() endif()
if(NOT(Python3_Interpreter_FOUND)) if(NOT(PYTHONINTERP_FOUND))
message(SEND_ERROR "You must install Python to compile DDNet") message(SEND_ERROR "You must install Python to compile DDNet")
endif() endif()
@ -591,7 +591,7 @@ file(COPY ${COPY_FILES} DESTINATION .)
function(generate_source output_file script_parameter) function(generate_source output_file script_parameter)
add_custom_command(OUTPUT ${output_file} add_custom_command(OUTPUT ${output_file}
COMMAND ${Python3_EXECUTABLE} datasrc/compile.py ${script_parameter} COMMAND ${PYTHON_EXECUTABLE} datasrc/compile.py ${script_parameter}
> "${PROJECT_BINARY_DIR}/${output_file}" > "${PROJECT_BINARY_DIR}/${output_file}"
DEPENDS DEPENDS
datasrc/compile.py datasrc/compile.py
@ -604,7 +604,7 @@ endfunction()
function(generate_source7 output_file script_parameter) function(generate_source7 output_file script_parameter)
add_custom_command(OUTPUT ${output_file} add_custom_command(OUTPUT ${output_file}
COMMAND ${Python3_EXECUTABLE} -m datasrc.seven.compile ${script_parameter} COMMAND ${PYTHON_EXECUTABLE} -m datasrc.seven.compile ${script_parameter}
> "${PROJECT_BINARY_DIR}/${output_file}" > "${PROJECT_BINARY_DIR}/${output_file}"
DEPENDS DEPENDS
datasrc/seven/compile.py datasrc/seven/compile.py
@ -617,7 +617,7 @@ endfunction()
function(generate_maps output_file) function(generate_maps output_file)
add_custom_command(OUTPUT ${output_file} add_custom_command(OUTPUT ${output_file}
COMMAND ${Python3_EXECUTABLE} datasrc/crosscompile.py COMMAND ${PYTHON_EXECUTABLE} datasrc/crosscompile.py
> "${PROJECT_BINARY_DIR}/${output_file}" > "${PROJECT_BINARY_DIR}/${output_file}"
DEPENDS DEPENDS
datasrc/compile.py datasrc/compile.py
@ -646,7 +646,7 @@ if(NOT PROJECT_GIT_DIR_ERROR)
) )
endif() endif()
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src/game/generated/git_revision.cpp add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src/game/generated/git_revision.cpp
COMMAND ${Python3_EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE}
scripts/git_revision.py scripts/git_revision.py
> ${PROJECT_BINARY_DIR}/src/game/generated/git_revision.cpp > ${PROJECT_BINARY_DIR}/src/game/generated/git_revision.cpp
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
@ -1627,7 +1627,7 @@ if(CLIENT AND (DMGTOOLS_FOUND OR HDIUTIL))
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${TARGET_SERVER}> $<TARGET_FILE:${TARGET_SERVER_LAUNCHER}> ${DMG_TMPDIR}/${TARGET_SERVER}.app/Contents/MacOS/ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${TARGET_SERVER}> $<TARGET_FILE:${TARGET_SERVER_LAUNCHER}> ${DMG_TMPDIR}/${TARGET_SERVER}.app/Contents/MacOS/
# DMG # DMG
COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/dmg.py create ${DMG_PARAMS} ${CPACK_PACKAGE_FILE_NAME}.dmg ${CPACK_PACKAGE_FILE_NAME} ${DMG_TMPDIR} COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/dmg.py create ${DMG_PARAMS} ${CPACK_PACKAGE_FILE_NAME}.dmg ${CPACK_PACKAGE_FILE_NAME} ${DMG_TMPDIR}
DEPENDS DEPENDS
${TARGET_CLIENT} ${TARGET_CLIENT}