CMake: Allow overriding the exe name

This commit is contained in:
TellowKrinkle 2023-01-28 17:24:31 -06:00 committed by refractionpcsx2
parent 11930ed7a2
commit e0a1613ad9
1 changed files with 5 additions and 1 deletions

View File

@ -1288,7 +1288,7 @@ function(setup_main_executable target)
install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${CMAKE_SOURCE_DIR}/bin)
endif()
find_program(WINDEPLOYQT_EXE windeployqt HINTS "${QT_BINARY_DIRECTORY}")
install(CODE "execute_process(COMMAND \"${WINDEPLOYQT_EXE}\" \"${CMAKE_SOURCE_DIR}/bin/pcsx2-qt.exe\" --plugindir ${CMAKE_SOURCE_DIR}/bin/QtPlugins --no-compiler-runtime --no-system-d3d-compiler)")
install(CODE "execute_process(COMMAND \"${WINDEPLOYQT_EXE}\" \"${CMAKE_SOURCE_DIR}/bin/$<TARGET_FILE_NAME:${target}>\" --plugindir ${CMAKE_SOURCE_DIR}/bin/QtPlugins --no-compiler-runtime --no-system-d3d-compiler)")
install(CODE "file(WRITE \"${CMAKE_SOURCE_DIR}/bin/qt.conf\" \"[Paths]\\nPlugins = ./QtPlugins\")")
endif()
@ -1365,6 +1365,10 @@ function(setup_main_executable target)
COMMAND bash -c "set +x\; echo 'Elevating to enable networking capability on $<TARGET_FILE:${target}>...'\; sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' '$<TARGET_FILE:${target}>'"
)
endif()
if(PCSX2_EXE_NAME)
set_target_properties(${target} PROPERTIES OUTPUT_NAME ${PCSX2_EXE_NAME})
endif()
endfunction()
source_groups_from_vcxproj_filters(pcsx2core.vcxproj.filters)