Use Ninja Multi-Config generator on Linux.

This commit is contained in:
John Preston 2021-11-14 11:31:54 +04:00
parent a02642b917
commit 96a3c704d2
4 changed files with 8 additions and 12 deletions

View file

@ -1399,12 +1399,13 @@ PRIVATE
G_LOG_DOMAIN="Telegram"
)
if (APPLE OR NOT CMAKE_EXECUTABLE_SUFFIX STREQUAL "" OR NOT "${output_name}" STREQUAL "Telegram")
if ("${CMAKE_GENERATOR}" STREQUAL "Xcode"
OR "${CMAKE_GENERATOR}" STREQUAL "Ninja Multi-Config"
OR NOT CMAKE_EXECUTABLE_SUFFIX STREQUAL ""
OR NOT "${output_name}" STREQUAL "Telegram")
set(output_folder ${CMAKE_BINARY_DIR})
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
set(output_folder ${CMAKE_BINARY_DIR}/bin)
else()
set(output_folder ${CMAKE_BINARY_DIR}/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(output_folder ${CMAKE_BINARY_DIR}/bin)
endif()
set_target_properties(Telegram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})

View file

@ -33,7 +33,7 @@ fi
Run ./configure.sh
cd $ProjectPath
Run cmake --build . --config Release --target Telegram -- -j8
Run cmake --build . --config Release --target Telegram
cd $ReleasePath
echo "$BinaryName build complete!"

View file

@ -59,9 +59,4 @@ if officialTarget != '':
arguments.append('-DTDESKTOP_API_HASH=' + apiHashMatch.group(1))
if arch != '':
arguments.append(arch)
finish(run_cmake.run(scriptName, arguments))
elif 'linux' in sys.platform:
debugCode = run_cmake.run(scriptName, arguments, "Debug")
finish(debugCode if debugCode else run_cmake.run(scriptName, arguments, "Release"))
else:
finish(run_cmake.run(scriptName, arguments))
finish(run_cmake.run(scriptName, arguments))

2
cmake

@ -1 +1 @@
Subproject commit 051f7ba4e38226797bafbd9c1ed52ef38afe28b9
Subproject commit 2034686f01d2207bde5b060e71a416f2f4419287