mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Convert Steamshim Makefile to CMake
This commit is contained in:
parent
804c52a83f
commit
5ea165cb36
6 changed files with 48 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -53,3 +53,5 @@ conan_imports_manifest\.txt
|
|||
package/
|
||||
|
||||
oclint/
|
||||
|
||||
steamshim_parent/build/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
rm -rf journal/mac/__pycache__
|
||||
rm -rf steamshim_parent/steamshim
|
||||
rm -rf steamshim_parent/build
|
||||
rm -rf build
|
||||
rm -rf dist
|
||||
rm -rf _______.app
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ cd `dirname $0`
|
|||
linux_version="0.1.0"
|
||||
make_threads=8
|
||||
ONESHOT_PATH=$HOME/.steam/steam/steamapps/common/OneShot
|
||||
STEAMWORKS_PATH=/usr/steamworks
|
||||
|
||||
# Colors
|
||||
white="\033[0;37m" # White - Regular
|
||||
|
|
@ -24,8 +25,10 @@ echo "-> ${cyan}Compile engine...${color_reset}"
|
|||
make -j${make_threads}
|
||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||
cd steamshim_parent
|
||||
HOST=linux64 make -j${make_threads}
|
||||
cd ..
|
||||
mkdir build && cd build
|
||||
cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} ..
|
||||
make -j${make_threads}
|
||||
cd ../..
|
||||
echo "-> ${cyan}Compile journal...${color_reset}"
|
||||
pyinstaller journal/unix/journal.spec --onefile --windowed
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ cd `dirname $0`
|
|||
mac_version="1.1.0"
|
||||
make_threads=8
|
||||
ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot
|
||||
STEAMWORKS_PATH=$HOME/Developer/downloaded/steamworks
|
||||
|
||||
# Colors
|
||||
white="\033[0;37m" # White - Regular
|
||||
|
|
@ -28,8 +29,10 @@ if [[ $use_qmake == True ]]
|
|||
make -j${make_threads}
|
||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||
cd steamshim_parent
|
||||
HOST=osx make -j${make_threads}
|
||||
cd ..
|
||||
mkdir build && cd build
|
||||
cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} ..
|
||||
make -j${make_threads}
|
||||
cd ../..
|
||||
else
|
||||
echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}"
|
||||
fi
|
||||
|
|
@ -54,7 +57,7 @@ if [ ! -e $ResourcesDir ]
|
|||
mkdir -p "$ResourcesDir"
|
||||
fi
|
||||
|
||||
cp steamshim_parent/steamshim ./OneShot.app/Contents/Resources/steamshim
|
||||
cp steamshim_parent/build/steamshim ./OneShot.app/Contents/Resources/steamshim
|
||||
cp patches/mac/libsteam_api.dylib ./OneShot.app/Contents/Libraries/libsteam_api.dylib
|
||||
cmake -P patches/mac/CompleteBundle.cmake
|
||||
cp assets/icon.icns ./OneShot.app/Contents/Resources/icon.icns
|
||||
|
|
|
|||
34
steamshim_parent/CMakeLists.txt
Normal file
34
steamshim_parent/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
set(STEAMWORKS_PATH "" CACHE PATH "Path to Steamworks folder")
|
||||
set(GAME_LAUNCH_NAME "oneshot" CACHE STRING "Game launch name")
|
||||
option(DEBUG "Debug mode" OFF)
|
||||
|
||||
set(SOURCES
|
||||
steamshim_parent.cpp
|
||||
)
|
||||
|
||||
include_directories(${STEAMWORKS_PATH}/public)
|
||||
|
||||
add_definitions(-DGAME_LAUNCH_NAME="${GAME_LAUNCH_NAME}")
|
||||
|
||||
IF(DEBUG)
|
||||
add_definitions(-DSTEAMSHIM_DEBUG)
|
||||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
link_directories(${STEAMWORKS_PATH}/redistributable_bin/osx32)
|
||||
ELSEIF(WIN32)
|
||||
list(APPEND SOURCES resources.rc)
|
||||
link_directories(${STEAMWORKS_PATH}/redistributable_bin)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows")
|
||||
ELSEIF(LINUX)
|
||||
link_directories(${STEAMWORKS_PATH}/redistributable_bin/linux64)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
ENDIF()
|
||||
|
||||
add_executable(steamshim
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(steamshim steam_api)
|
||||
Loading…
Reference in a new issue