Fixed: Copy Steam runtime to bundle and sign it under OS X
--HG-- branch : compatibility-develop
This commit is contained in:
parent
8008b68877
commit
fb41219ce8
2 changed files with 27 additions and 4 deletions
|
@ -20,38 +20,52 @@ FIND_PATH(STEAM_INCLUDE_DIR
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(STEAM_LIBNAME steam_api64)
|
SET(STEAM_LIBNAME steam_api64)
|
||||||
|
SET(STEAM_RUNTIMENAME steam_api64.dll)
|
||||||
SET(STEAM_PATHNAME redistributable_bin/win64)
|
SET(STEAM_PATHNAME redistributable_bin/win64)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(STEAM_LIBNAME steam_api)
|
SET(STEAM_LIBNAME steam_api)
|
||||||
|
SET(STEAM_RUNTIMENAME steam_api.dll)
|
||||||
SET(STEAM_PATHNAME redistributable_bin)
|
SET(STEAM_PATHNAME redistributable_bin)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSEIF(APPLE)
|
ELSEIF(APPLE)
|
||||||
# universal binary
|
# universal binary
|
||||||
SET(STEAM_LIBNAME steam_api)
|
SET(STEAM_LIBNAME steam_api)
|
||||||
|
SET(STEAM_RUNTIMENAME libsteam_api.dylib)
|
||||||
SET(STEAM_PATHNAME redistributable_bin/osx32)
|
SET(STEAM_PATHNAME redistributable_bin/osx32)
|
||||||
ELSE()
|
ELSE()
|
||||||
IF(TARGET_X64)
|
|
||||||
SET(STEAM_LIBNAME steam_api)
|
SET(STEAM_LIBNAME steam_api)
|
||||||
|
SET(STEAM_RUNTIMENAME libsteam_api.so)
|
||||||
|
IF(TARGET_X64)
|
||||||
SET(STEAM_PATHNAME redistributable_bin/linux64)
|
SET(STEAM_PATHNAME redistributable_bin/linux64)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(STEAM_LIBNAME steam_api)
|
|
||||||
SET(STEAM_PATHNAME redistributable_bin/linux32)
|
SET(STEAM_PATHNAME redistributable_bin/linux32)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
FIND_LIBRARY(STEAM_LIBRARY
|
FIND_LIBRARY(STEAM_LIBRARY
|
||||||
NAMES ${STEAM_LIBNAME}
|
NAMES ${STEAM_LIBNAME}
|
||||||
PATHS
|
HINTS
|
||||||
$ENV{STEAM_DIR}/${STEAM_PATHNAME}
|
$ENV{STEAM_DIR}/${STEAM_PATHNAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FIND_FILE(STEAM_RUNTIME
|
||||||
|
NAMES ${STEAM_RUNTIMENAME}
|
||||||
|
HINTS
|
||||||
|
$ENV{STEAM_DIR}/${STEAM_PATHNAME}
|
||||||
|
PATHS
|
||||||
|
${EXTERNAL_BINARY_PATH}
|
||||||
|
${CMAKE_LIBRARY_PATH}
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
)
|
||||||
|
|
||||||
# Don't need to check STEAM_LIBRARY because we're dynamically loading Steam DLL
|
# Don't need to check STEAM_LIBRARY because we're dynamically loading Steam DLL
|
||||||
IF(STEAM_INCLUDE_DIR)
|
IF(STEAM_INCLUDE_DIR)
|
||||||
SET(STEAM_FOUND ON)
|
SET(STEAM_FOUND ON)
|
||||||
SET(STEAM_LIBRARIES ${STEAM_LIBRARY})
|
SET(STEAM_LIBRARIES ${STEAM_LIBRARY})
|
||||||
SET(STEAM_INCLUDE_DIRS ${STEAM_INCLUDE_DIR})
|
SET(STEAM_INCLUDE_DIRS ${STEAM_INCLUDE_DIR})
|
||||||
IF(NOT Steam_FIND_QUIETLY)
|
IF(NOT Steam_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Steam: ${STEAM_INCLUDE_DIR}")
|
MESSAGE(STATUS "Found Steam: ${STEAM_INCLUDE_DIR} and ${STEAM_RUNTIME}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
IF(NOT Steam_FIND_QUIETLY)
|
IF(NOT Steam_FIND_QUIETLY)
|
||||||
|
|
|
@ -116,6 +116,15 @@ IF(WITH_RYZOM_CLIENT)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
IF(WITH_RYZOM_STEAM AND STEAM_RUNTIME)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp -p ${STEAM_RUNTIME} ${RYZOM_CONTENTS_DIR}/MacOS)
|
||||||
|
|
||||||
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --no-strict -fs "${APPLE_CERTIFICATE}" "${RYZOM_CONTENTS_DIR}/MacOS/${STEAM_RUNTIMENAME}" COMMENT "Signing Steam client runtime...")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
||||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing Ryzom bundle...")
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing Ryzom bundle...")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
Loading…
Reference in a new issue