mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Merge pull request #10742 from tellowkrinkle/Xcode
Improve incremental build time for Xcode projects
This commit is contained in:
commit
8a8e9c5ef6
@ -96,6 +96,7 @@ if(APPLE)
|
|||||||
option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF)
|
option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF)
|
||||||
# Enable adhoc code signing by default (otherwise makefile builds on ARM will not work)
|
# Enable adhoc code signing by default (otherwise makefile builds on ARM will not work)
|
||||||
option(MACOS_CODE_SIGNING "Enable codesigning" ON)
|
option(MACOS_CODE_SIGNING "Enable codesigning" ON)
|
||||||
|
option(USE_BUNDLED_MOLTENVK "Build MoltenVK from Externals with Dolphin-specific patches" ON)
|
||||||
set(MACOS_CODE_SIGNING_IDENTITY "-" CACHE STRING "The identity used for codesigning.")
|
set(MACOS_CODE_SIGNING_IDENTITY "-" CACHE STRING "The identity used for codesigning.")
|
||||||
set(MACOS_CODE_SIGNING_IDENTITY_UPDATER "-" CACHE STRING "The identity used for codesigning, for the updater.")
|
set(MACOS_CODE_SIGNING_IDENTITY_UPDATER "-" CACHE STRING "The identity used for codesigning, for the updater.")
|
||||||
endif()
|
endif()
|
||||||
@ -663,7 +664,7 @@ add_subdirectory(Externals/glslang)
|
|||||||
if(ENABLE_VULKAN)
|
if(ENABLE_VULKAN)
|
||||||
add_definitions(-DHAS_VULKAN)
|
add_definitions(-DHAS_VULKAN)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE AND USE_BUNDLED_MOLTENVK)
|
||||||
add_subdirectory(Externals/MoltenVK)
|
add_subdirectory(Externals/MoltenVK)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -572,20 +572,31 @@ if(APPLE)
|
|||||||
|
|
||||||
# Copy MoltenVK into the bundle
|
# Copy MoltenVK into the bundle
|
||||||
if(ENABLE_VULKAN)
|
if(ENABLE_VULKAN)
|
||||||
add_dependencies(dolphin-emu MoltenVK)
|
if(USE_BUNDLED_MOLTENVK)
|
||||||
ExternalProject_Get_Property(MoltenVK SOURCE_DIR)
|
add_dependencies(dolphin-emu MoltenVK)
|
||||||
target_sources(dolphin-emu PRIVATE "${SOURCE_DIR}/Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib")
|
ExternalProject_Get_Property(MoltenVK SOURCE_DIR)
|
||||||
set_source_files_properties("${SOURCE_DIR}/Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks GENERATED ON)
|
target_sources(dolphin-emu PRIVATE "${SOURCE_DIR}/Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib")
|
||||||
|
set_source_files_properties("${SOURCE_DIR}/Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks GENERATED ON)
|
||||||
|
else()
|
||||||
|
find_file(MOLTENVK_DYLIB NAMES libMoltenVK.dylib PATH_SUFFIXES lib)
|
||||||
|
if(NOT MOLTENVK_DYLIB)
|
||||||
|
message(FATAL_ERROR "Couldn't find libMoltenVK.dylib. Enable USE_BUNDLED_MOLTENVK?")
|
||||||
|
endif()
|
||||||
|
target_sources(dolphin-emu PRIVATE ${MOLTENVK_DYLIB})
|
||||||
|
set_source_files_properties(${MOLTENVK_DYLIB} PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Update library references to make the bundle portable
|
if(NOT SKIP_POSTPROCESS_BUNDLE)
|
||||||
include(DolphinPostprocessBundle)
|
# Update library references to make the bundle portable
|
||||||
dolphin_postprocess_bundle(dolphin-emu)
|
include(DolphinPostprocessBundle)
|
||||||
# Fix rpath
|
dolphin_postprocess_bundle(dolphin-emu)
|
||||||
add_custom_command(TARGET dolphin-emu
|
# Fix rpath
|
||||||
POST_BUILD COMMAND
|
add_custom_command(TARGET dolphin-emu
|
||||||
${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/"
|
POST_BUILD COMMAND
|
||||||
$<TARGET_FILE:dolphin-emu>)
|
${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/"
|
||||||
|
$<TARGET_FILE:dolphin-emu>)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MACOS_CODE_SIGNING)
|
if(MACOS_CODE_SIGNING)
|
||||||
# Code sign make file builds
|
# Code sign make file builds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user