From e00b5f1ebea9b10e5b1b104fd98b965c5090264b Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Thu, 12 May 2022 14:55:58 +0200 Subject: [PATCH] Fix steam dylib paths --- ScreenPlay/CMakeLists.txt | 3 --- ScreenPlayWorkshop/CMakeLists.txt | 14 +++----------- Tools/setup.py | 1 - 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index c26bc238..d546d1f2 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -389,9 +389,6 @@ if(APPLE) XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME TRUE XCODE_ATTRIBUTE_EXECUTABLE_NAME ${PROJECT_NAME}) - # Needed for the Steam Workshop qml plugin - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/Workshop) - add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD diff --git a/ScreenPlayWorkshop/CMakeLists.txt b/ScreenPlayWorkshop/CMakeLists.txt index b0f27e5b..3ee6e37a 100644 --- a/ScreenPlayWorkshop/CMakeLists.txt +++ b/ScreenPlayWorkshop/CMakeLists.txt @@ -72,16 +72,12 @@ set(RESOURCES set(STEAM_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/SteamSDK/redistributable_bin/") if(WIN32) - set(WORKSHOP_PLUGIN_DIR ${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}) set(STEAM_LIB "${STEAM_LIB_PATH}/win64/steam_api64.lib") set(STEAM_BIN "${STEAM_LIB_PATH}/win64/steam_api64.dll") elseif(APPLE) - set(WORKSHOP_PLUGIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/MacOS/ScreenPlay/qml/${PROJECT_NAME}) - set(MACOS_FRAMEWORKS_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/Frameworks/) set(STEAM_LIB "${STEAM_LIB_PATH}/osx/libsteam_api.dylib") set(STEAM_BIN ${STEAM_LIB}) elseif(UNIX) - set(WORKSHOP_PLUGIN_DIR ${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}) set(STEAM_LIB "${STEAM_LIB_PATH}/linux64/libsteam_api.so") set(STEAM_BIN ${STEAM_LIB}) endif() @@ -118,14 +114,10 @@ qt_add_qml_module( if(${SCREENPLAY_STEAM}) if(APPLE) - file(MAKE_DIRECTORY ${WORKSHOP_PLUGIN_DIR}) + set(MACOS_FRAMEWORKS_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/MacOS/) file(MAKE_DIRECTORY ${MACOS_FRAMEWORKS_DIR}) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/steam_appid.txt ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/ COPYONLY) - configure_file(${STEAM_BIN} ${WORKSHOP_PLUGIN_DIR} COPYONLY) - - set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY - ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/Workshop) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/steam_appid.txt ${MACOS_FRAMEWORKS_DIR} COPYONLY) + configure_file(${STEAM_BIN} ${MACOS_FRAMEWORKS_DIR} COPYONLY) else() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/steam_appid.txt ${CMAKE_BINARY_DIR}/bin/steam_appid.txt COPYONLY) configure_file(${STEAM_BIN} ${CMAKE_BINARY_DIR}/bin/ COPYONLY) diff --git a/Tools/setup.py b/Tools/setup.py index 5af76649..16e1bff2 100755 --- a/Tools/setup.py +++ b/Tools/setup.py @@ -75,7 +75,6 @@ without the ScreenPlay-vcpkg folder (E.g. py .\setup.py --path "D:/Backup/Code/Q "cpp-httplib", "libarchive" ] - if system() == "Windows": vcpkg_command = "vcpkg.exe"