mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #14214 from JoshuaVandaele/cmake-nonbreaking-improvements
CMake: Various improvements
This commit is contained in:
@@ -387,7 +387,7 @@ elseif(WIN32)
|
||||
)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/build_info.txt.in"
|
||||
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/build_info.txt"
|
||||
"${CMAKE_BINARY_DIR}/build_info.txt"
|
||||
)
|
||||
|
||||
target_link_libraries(common PRIVATE "-INCLUDE:enableCompatPatches")
|
||||
|
||||
@@ -23,7 +23,16 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
target_sources(dolphin-nogui PRIVATE PlatformFBDev.cpp)
|
||||
endif()
|
||||
|
||||
set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui)
|
||||
if (WIN32)
|
||||
target_sources(dolphin-nogui PRIVATE DolphinNoGUI.exe.manifest DolphinNoGUI.rc)
|
||||
|
||||
set_target_properties(dolphin-nogui PROPERTIES
|
||||
DEBUG_POSTFIX D
|
||||
OUTPUT_NAME DolphinNoGUI
|
||||
)
|
||||
else()
|
||||
set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui)
|
||||
endif()
|
||||
|
||||
target_link_libraries(dolphin-nogui
|
||||
PRIVATE
|
||||
|
||||
@@ -517,6 +517,13 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.win" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf"
|
||||
)
|
||||
|
||||
if (ENABLE_AUTOUPDATE)
|
||||
# Copy build_info.txt
|
||||
add_custom_command(TARGET dolphin-emu POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR}/build_info.txt" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/build_info.txt"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Delegate to Qt's official deployment binary on Windows to copy over the necessary Qt-specific libraries, etc.
|
||||
get_target_property(MOC_EXECUTABLE_LOCATION Qt6::moc IMPORTED_LOCATION)
|
||||
get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY)
|
||||
|
||||
@@ -508,15 +508,18 @@
|
||||
<!--Copy Exe, Data directory and DLLs which should be located in the executable directory-->
|
||||
<ItemGroup>
|
||||
<DataSysFiles Include="$(DolphinRootDir)Data\**\Sys\**\*.*" />
|
||||
<DataTxtFiles Include="$(DolphinRootDir)Data\license.txt" />
|
||||
<DataTxtFiles Include="$(DolphinRootDir)\COPYING" />
|
||||
<DataLicenseFiles Include="$(DolphinRootDir)\LICENSES\*.*" />
|
||||
<BinaryFiles Include="$(TargetPath)" />
|
||||
<AllInputFiles Include="@(DataSysFiles);@(DataTxtFiles);@(BinaryFiles)" />
|
||||
<AllInputFiles Include="@(DataSysFiles);@(DataTxtFiles);@(DataLicenseFiles);@(BinaryFiles)" />
|
||||
</ItemGroup>
|
||||
<Target Name="AfterBuild" Inputs="@(AllInputFiles)" Outputs="@(AllInputFiles -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
<Message Text="Copying Data directory..." Importance="High" />
|
||||
<RemoveDir Directories="$(BinaryOutputDir)Sys" />
|
||||
<Copy SourceFiles="@(DataSysFiles)" DestinationFolder="$(BinaryOutputDir)%(RecursiveDir)" SkipUnchangedFiles="True" />
|
||||
<Copy SourceFiles="@(DataTxtFiles)" DestinationFolder="$(BinaryOutputDir)" SkipUnchangedFiles="True" />
|
||||
<RemoveDir Directories="$(BinaryOutputDir)LICENSES" />
|
||||
<Copy SourceFiles="@(DataLicenseFiles)" DestinationFolder="$(BinaryOutputDir)LICENSES" SkipUnchangedFiles="True" />
|
||||
<Message Text="Copy: @(BinaryFiles) -> $(BinaryOutputDir)" Importance="High" />
|
||||
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(BinaryOutputDir)" />
|
||||
</Target>
|
||||
|
||||
@@ -11,7 +11,14 @@ add_executable(dolphin-tool
|
||||
ToolMain.cpp
|
||||
)
|
||||
|
||||
set_target_properties(dolphin-tool PROPERTIES OUTPUT_NAME dolphin-tool)
|
||||
if (WIN32)
|
||||
target_sources(dolphin-tool PRIVATE DolphinTool.exe.manifest DolphinTool.rc)
|
||||
|
||||
set_target_properties(dolphin-tool PROPERTIES
|
||||
DEBUG_POSTFIX D
|
||||
OUTPUT_NAME DolphinTool
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(dolphin-tool
|
||||
PRIVATE
|
||||
|
||||
Reference in New Issue
Block a user