mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-08 02:53:38 +02:00
Initial Steamworks integration
This commit is contained in:
parent
55330f2205
commit
96258a795a
6 changed files with 103 additions and 1 deletions
12
cmake/macros/TargetSteamworks.cmake
Normal file
12
cmake/macros/TargetSteamworks.cmake
Normal file
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Copyright 2015 High Fidelity, Inc.
|
||||
# Created by Clement Brisset on 6/8/2016
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
macro(TARGET_STEAMWORKS)
|
||||
find_package(Steamworks REQUIRED)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${STEAMWORKS_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${STEAMWORKS_LIBRARIES})
|
||||
endmacro()
|
45
cmake/modules/FindSteamworks.cmake
Normal file
45
cmake/modules/FindSteamworks.cmake
Normal file
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# FindSteamworks.cmake
|
||||
#
|
||||
# Try to find the Steamworks controller library
|
||||
#
|
||||
# This module defines the following variables
|
||||
#
|
||||
# STEAMWORKS_FOUND - Was Steamworks found
|
||||
# STEAMWORKS_INCLUDE_DIRS - the Steamworks include directory
|
||||
# STEAMWORKS_LIBRARIES - Link this to use Steamworks
|
||||
#
|
||||
# This module accepts the following variables
|
||||
#
|
||||
# STEAMWORKS_ROOT - Can be set to steamworks install path or Windows build path
|
||||
#
|
||||
# Created on 6/8/2016 by Clement Brisset
|
||||
# Copyright 2016 High Fidelity, Inc.
|
||||
#
|
||||
# Distributed under the Apache License, Version 2.0.
|
||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
#
|
||||
|
||||
set(STEAMWORKS_POSSIBLE_PATHS "/Users/clement/Downloads/steamworks_sdk_137/")
|
||||
|
||||
find_path(STEAMWORKS_INCLUDE_DIRS
|
||||
NAMES steam_api.h
|
||||
PATH_SUFFIXES "public/steam"
|
||||
PATHS ${STEAMWORKS_POSSIBLE_PATHS}
|
||||
)
|
||||
|
||||
get_filename_component(STEAMWORKS_INCLUDE_DIR_NAME ${STEAMWORKS_INCLUDE_DIRS} NAME)
|
||||
if (STEAMWORKS_INCLUDE_DIR_NAME STREQUAL "steam")
|
||||
get_filename_component(STEAMWORKS_INCLUDE_DIRS ${STEAMWORKS_INCLUDE_DIRS} PATH)
|
||||
else()
|
||||
message(STATUS "Include directory not named steam, this will cause issues with include statements")
|
||||
endif()
|
||||
|
||||
find_library(STEAMWORKS_LIBRARIES
|
||||
NAMES libsteam_api.dylib
|
||||
PATH_SUFFIXES "redistributable_bin/osx32"
|
||||
PATHS ${STEAMWORKS_POSSIBLE_PATHS}
|
||||
)
|
||||
|
||||
|
||||
find_package_handle_standard_args(Steamworks DEFAULT_MSG STEAMWORKS_LIBRARIES STEAMWORKS_INCLUDE_DIRS)
|
|
@ -139,7 +139,7 @@ link_hifi_libraries(shared octree gpu gl gpu-gl procedural model render
|
|||
recording fbx networking model-networking entities avatars
|
||||
audio audio-client animation script-engine physics
|
||||
render-utils entities-renderer ui auto-updater
|
||||
controllers plugins display-plugins input-plugins)
|
||||
controllers plugins display-plugins input-plugins steamworks-wrapper)
|
||||
|
||||
# include the binary directory of render-utils for shader includes
|
||||
target_include_directories(${TARGET_NAME} PRIVATE "${CMAKE_BINARY_DIR}/libraries/render-utils")
|
||||
|
|
5
libraries/steamworks-wrapper/CMakeLists.txt
Normal file
5
libraries/steamworks-wrapper/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
set(TARGET_NAME steamworks-wrapper)
|
||||
setup_hifi_library()
|
||||
link_hifi_libraries()
|
||||
|
||||
target_steamworks()
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// SteamClient.cpp
|
||||
// steamworks-wrapper/src/steamworks-wrapper
|
||||
//
|
||||
// Created by Clement Brisset on 6/8/16.
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include "SteamClient.h"
|
||||
|
||||
#include <steam/steam_api.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
//
|
||||
// SteamClient.h
|
||||
// steamworks-wrapper/src/steamworks-wrapper
|
||||
//
|
||||
// Created by Clement Brisset on 6/8/16.
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
|
||||
#ifndef hifi_SteamClient_h
|
||||
#define hifi_SteamClient_h
|
||||
|
||||
class SteamClient {
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // hifi_SteamClient_h
|
Loading…
Reference in a new issue