update gh actions, fix cmake whitespace (#6361)
This commit is contained in:
2
.github/workflows/clang-format.yml
vendored
2
.github/workflows/clang-format.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
clang-format:
|
clang-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
- name: Install clang-format
|
- name: Install clang-format
|
||||||
|
|||||||
36
.github/workflows/generate-builds.yml
vendored
36
.github/workflows/generate-builds.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Git Checkout
|
- name: Git Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) libzip-dev zipcmp zipmerge ziptool
|
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) libzip-dev zipcmp zipmerge ziptool
|
||||||
- name: Restore Cached deps folder
|
- name: Restore Cached deps folder
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
|
key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
|
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
|
||||||
cmake --build build-cmake --config Release --target GenerateSohOtr -j3
|
cmake --build build-cmake --config Release --target GenerateSohOtr -j3
|
||||||
- name: Upload soh.o2r
|
- name: Upload soh.o2r
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh.o2r
|
name: soh.o2r
|
||||||
path: soh.o2r
|
path: soh.o2r
|
||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
- name: Git Checkout
|
- name: Git Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
@@ -99,7 +99,7 @@ jobs:
|
|||||||
sudo chmod +x /opt/homebrew/bin/gtar
|
sudo chmod +x /opt/homebrew/bin/gtar
|
||||||
- name: Restore Cached MacPorts
|
- name: Restore Cached MacPorts
|
||||||
id: restore-cache-macports
|
id: restore-cache-macports
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-14-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}-${{ github.sha }}
|
key: ${{ runner.os }}-14-macports-${{ hashFiles('.github/workflows/macports-deps.txt') }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
sudo port install $(cat .github/workflows/macports-deps.txt)
|
sudo port install $(cat .github/workflows/macports-deps.txt)
|
||||||
brew install ninja
|
brew install ninja
|
||||||
- name: Download soh.o2r
|
- name: Download soh.o2r
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh.o2r
|
name: soh.o2r
|
||||||
path: build-cmake/soh
|
path: build-cmake/soh
|
||||||
@@ -137,7 +137,7 @@ jobs:
|
|||||||
mv _packages/*.dmg SoH.dmg
|
mv _packages/*.dmg SoH.dmg
|
||||||
mv README.md readme.txt
|
mv README.md readme.txt
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh-mac
|
name: soh-mac
|
||||||
path: |
|
path: |
|
||||||
@@ -145,7 +145,7 @@ jobs:
|
|||||||
readme.txt
|
readme.txt
|
||||||
- name: Save Cache MacPorts
|
- name: Save Cache MacPorts
|
||||||
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ steps.restore-cache-macports.outputs.cache-primary-key }}
|
key: ${{ steps.restore-cache-macports.outputs.cache-primary-key }}
|
||||||
path: /opt/local/
|
path: /opt/local/
|
||||||
@@ -155,7 +155,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Git Checkout
|
- name: Git Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -172,7 +172,7 @@ jobs:
|
|||||||
${{ runner.os }}-ccache
|
${{ runner.os }}-ccache
|
||||||
- name: Restore Cached deps folder
|
- name: Restore Cached deps folder
|
||||||
id: restore-cache-deps
|
id: restore-cache-deps
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
|
key: ${{ runner.os }}-deps-${{ github.ref }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
@@ -234,7 +234,7 @@ jobs:
|
|||||||
sudo make install
|
sudo make install
|
||||||
sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/
|
sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/
|
||||||
- name: Download soh.o2r
|
- name: Download soh.o2r
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh.o2r
|
name: soh.o2r
|
||||||
path: build-cmake/soh
|
path: build-cmake/soh
|
||||||
@@ -251,7 +251,7 @@ jobs:
|
|||||||
CC: gcc-12
|
CC: gcc-12
|
||||||
CXX: g++-12
|
CXX: g++-12
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh-linux
|
name: soh-linux
|
||||||
path: |
|
path: |
|
||||||
@@ -259,7 +259,7 @@ jobs:
|
|||||||
readme.txt
|
readme.txt
|
||||||
- name: Save Cache deps folder
|
- name: Save Cache deps folder
|
||||||
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ steps.restore-cache-deps.outputs.cache-primary-key }}
|
key: ${{ steps.restore-cache-deps.outputs.cache-primary-key }}
|
||||||
path: deps
|
path: deps
|
||||||
@@ -273,7 +273,7 @@ jobs:
|
|||||||
choco install ninja -y
|
choco install ninja -y
|
||||||
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
|
||||||
- name: Git Checkout
|
- name: Git Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Configure sccache
|
- name: Configure sccache
|
||||||
@@ -289,7 +289,7 @@ jobs:
|
|||||||
${{ runner.os }}-ccache
|
${{ runner.os }}-ccache
|
||||||
- name: Restore Cached VCPKG folder
|
- name: Restore Cached VCPKG folder
|
||||||
id: restore-cache-vcpkg
|
id: restore-cache-vcpkg
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-vcpkg-${{ github.ref }}-${{ github.sha }}
|
key: ${{ runner.os }}-vcpkg-${{ github.ref }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
@@ -299,7 +299,7 @@ jobs:
|
|||||||
- name: Configure Developer Command Prompt
|
- name: Configure Developer Command Prompt
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
- name: Download soh.o2r
|
- name: Download soh.o2r
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh.o2r
|
name: soh.o2r
|
||||||
path: build-windows/soh
|
path: build-windows/soh
|
||||||
@@ -317,13 +317,13 @@ jobs:
|
|||||||
- name: Unzip package
|
- name: Unzip package
|
||||||
run: Expand-Archive -Path _packages/soh-windows.zip -DestinationPath soh-windows
|
run: Expand-Archive -Path _packages/soh-windows.zip -DestinationPath soh-windows
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: soh-windows
|
name: soh-windows
|
||||||
path: soh-windows
|
path: soh-windows
|
||||||
- name: Save Cache VCPKG folder
|
- name: Save Cache VCPKG folder
|
||||||
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v5
|
||||||
with:
|
with:
|
||||||
key: ${{ steps.restore-cache-vcpkg.outputs.cache-primary-key }}
|
key: ${{ steps.restore-cache-vcpkg.outputs.cache-primary-key }}
|
||||||
path: vcpkg
|
path: vcpkg
|
||||||
|
|||||||
4
.github/workflows/pr-artifacts.yml
vendored
4
.github/workflows/pr-artifacts.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||||
steps:
|
steps:
|
||||||
- id: 'pr-number'
|
- id: 'pr-number'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
script: |
|
script: |
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
return prNumber;
|
return prNumber;
|
||||||
- id: 'artifacts-text'
|
- id: 'artifacts-text'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
result-encoding: string
|
result-encoding: string
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
2
.github/workflows/test-builds-on-distros.yml
vendored
2
.github/workflows/test-builds-on-distros.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
|||||||
cmake ..
|
cmake ..
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Build SoH
|
- name: Build SoH
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ set (BUILD_SHARED_LIBS OFF CACHE STRING "install/link shared instead of static l
|
|||||||
# Set target arch type if empty. Visual studio solution generator provides it.
|
# Set target arch type if empty. Visual studio solution generator provides it.
|
||||||
################################################################################
|
################################################################################
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
if(NOT CMAKE_VS_PLATFORM_NAME)
|
if(NOT CMAKE_VS_PLATFORM_NAME)
|
||||||
set(CMAKE_VS_PLATFORM_NAME "x64")
|
set(CMAKE_VS_PLATFORM_NAME "x64")
|
||||||
endif()
|
endif()
|
||||||
message("${CMAKE_VS_PLATFORM_NAME} architecture in use")
|
message("${CMAKE_VS_PLATFORM_NAME} architecture in use")
|
||||||
|
|
||||||
if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64"
|
if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64"
|
||||||
OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32"))
|
OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32"))
|
||||||
message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!")
|
message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -232,55 +232,55 @@ endif()
|
|||||||
set(ROOT_NAMESPACE soh)
|
set(ROOT_NAMESPACE soh)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
VS_GLOBAL_KEYWORD "Win32Proj"
|
VS_GLOBAL_KEYWORD "Win32Proj"
|
||||||
)
|
)
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||||
)
|
)
|
||||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES
|
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES
|
||||||
OUTPUT_NAME "soh-macos"
|
OUTPUT_NAME "soh-macos"
|
||||||
)
|
)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
OUTPUT_NAME "soh.elf"
|
OUTPUT_NAME "soh.elf"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
################################################################################
|
################################################################################
|
||||||
# MSVC runtime library
|
# MSVC runtime library
|
||||||
################################################################################
|
################################################################################
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY)
|
get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY)
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||||
$<$<CONFIG:Debug>:
|
$<$<CONFIG:Debug>:
|
||||||
MultiThreadedDebug
|
MultiThreadedDebug
|
||||||
>
|
>
|
||||||
$<$<CONFIG:Release>:
|
$<$<CONFIG:Release>:
|
||||||
MultiThreaded
|
MultiThreaded
|
||||||
>
|
>
|
||||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||||
)
|
)
|
||||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||||
$<$<CONFIG:Debug>:
|
$<$<CONFIG:Debug>:
|
||||||
MultiThreadedDebug
|
MultiThreadedDebug
|
||||||
>
|
>
|
||||||
$<$<CONFIG:Release>:
|
$<$<CONFIG:Release>:
|
||||||
MultiThreaded
|
MultiThreaded
|
||||||
>
|
>
|
||||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
|
set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
|
||||||
endif()
|
endif()
|
||||||
################################################################################
|
################################################################################
|
||||||
# Find/download Dr Libs (For custom audio)
|
# Find/download Dr Libs (For custom audio)
|
||||||
@@ -317,94 +317,94 @@ endif()
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE assets
|
target_include_directories(${PROJECT_NAME} PRIVATE assets
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include/
|
${CMAKE_CURRENT_SOURCE_DIR}/include/
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/
|
${CMAKE_CURRENT_SOURCE_DIR}/src/
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/include
|
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/include
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD/resource/type
|
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD/resource/type
|
||||||
${SDL2-INCLUDE}
|
${SDL2-INCLUDE}
|
||||||
${SDL2-NET-INCLUDE}
|
${SDL2-NET-INCLUDE}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/assets/
|
${CMAKE_CURRENT_SOURCE_DIR}/assets/
|
||||||
${dr_libs_SOURCE_DIR}
|
${dr_libs_SOURCE_DIR}
|
||||||
.
|
.
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
"$<$<CONFIG:Debug>:"
|
"$<$<CONFIG:Debug>:"
|
||||||
"_DEBUG;"
|
"_DEBUG;"
|
||||||
"_CRT_SECURE_NO_WARNINGS;"
|
"_CRT_SECURE_NO_WARNINGS;"
|
||||||
"ENABLE_DX11;"
|
"ENABLE_DX11;"
|
||||||
">"
|
">"
|
||||||
"$<$<CONFIG:Release>:"
|
"$<$<CONFIG:Release>:"
|
||||||
"NDEBUG;"
|
"NDEBUG;"
|
||||||
">"
|
">"
|
||||||
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:ENABLE_REMOTE_CONTROL>"
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:ENABLE_REMOTE_CONTROL>"
|
||||||
"INCLUDE_GAME_PRINTF;"
|
"INCLUDE_GAME_PRINTF;"
|
||||||
"F3DEX_GBI_2"
|
"F3DEX_GBI_2"
|
||||||
"UNICODE;"
|
"UNICODE;"
|
||||||
"_UNICODE"
|
"_UNICODE"
|
||||||
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
||||||
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
||||||
STORMLIB_NO_AUTO_LINK
|
STORMLIB_NO_AUTO_LINK
|
||||||
"_CRT_SECURE_NO_WARNINGS;"
|
"_CRT_SECURE_NO_WARNINGS;"
|
||||||
NOMINMAX
|
NOMINMAX
|
||||||
)
|
)
|
||||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
"$<$<CONFIG:Debug>:"
|
"$<$<CONFIG:Debug>:"
|
||||||
"NOINCLUDE_GAME_PRINTF;"
|
"NOINCLUDE_GAME_PRINTF;"
|
||||||
"_DEBUG;"
|
"_DEBUG;"
|
||||||
"_CRT_SECURE_NO_WARNINGS;"
|
"_CRT_SECURE_NO_WARNINGS;"
|
||||||
"ENABLE_OPENGL;"
|
"ENABLE_OPENGL;"
|
||||||
">"
|
">"
|
||||||
"$<$<CONFIG:Release>:"
|
"$<$<CONFIG:Release>:"
|
||||||
"NDEBUG;"
|
"NDEBUG;"
|
||||||
">"
|
">"
|
||||||
"INCLUDE_GAME_PRINTF;"
|
"INCLUDE_GAME_PRINTF;"
|
||||||
"F3DEX_GBI_2"
|
"F3DEX_GBI_2"
|
||||||
"WIN32;"
|
"WIN32;"
|
||||||
"UNICODE;"
|
"UNICODE;"
|
||||||
"_UNICODE;"
|
"_UNICODE;"
|
||||||
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
||||||
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
||||||
STORMLIB_NO_AUTO_LINK
|
STORMLIB_NO_AUTO_LINK
|
||||||
NOMINMAX
|
NOMINMAX
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
|
elseif (CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
"$<$<CONFIG:Debug>:"
|
"$<$<CONFIG:Debug>:"
|
||||||
"_DEBUG;"
|
"_DEBUG;"
|
||||||
">"
|
">"
|
||||||
"$<$<CONFIG:Release>:"
|
"$<$<CONFIG:Release>:"
|
||||||
"NDEBUG;"
|
"NDEBUG;"
|
||||||
">"
|
">"
|
||||||
"F3DEX_GBI_2;"
|
"F3DEX_GBI_2;"
|
||||||
"SPDLOG_NO_THREAD_ID;"
|
"SPDLOG_NO_THREAD_ID;"
|
||||||
"SPDLOG_NO_TLS;"
|
"SPDLOG_NO_TLS;"
|
||||||
"STBI_NO_THREAD_LOCALS;"
|
"STBI_NO_THREAD_LOCALS;"
|
||||||
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
||||||
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
||||||
)
|
)
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang")
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
"$<$<CONFIG:Debug>:"
|
"$<$<CONFIG:Debug>:"
|
||||||
"_DEBUG;"
|
"_DEBUG;"
|
||||||
">"
|
">"
|
||||||
"$<$<CONFIG:Release>:"
|
"$<$<CONFIG:Release>:"
|
||||||
"NDEBUG;"
|
"NDEBUG;"
|
||||||
">"
|
">"
|
||||||
"F3DEX_GBI_2;"
|
"F3DEX_GBI_2;"
|
||||||
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:ENABLE_REMOTE_CONTROL>;"
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:ENABLE_REMOTE_CONTROL>;"
|
||||||
"_CONSOLE;"
|
"_CONSOLE;"
|
||||||
"_CRT_SECURE_NO_WARNINGS;"
|
"_CRT_SECURE_NO_WARNINGS;"
|
||||||
"ENABLE_OPENGL;"
|
"ENABLE_OPENGL;"
|
||||||
"UNICODE;"
|
"UNICODE;"
|
||||||
"_UNICODE;"
|
"_UNICODE;"
|
||||||
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
SPDLOG_ACTIVE_LEVEL=${SPDLOG_MIN_CUTOFF}
|
||||||
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
LOG_LEVEL_GAME_PRINTS=${SPDLOG_LEVEL_OFF}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
################################################################################
|
################################################################################
|
||||||
# Compile and link options
|
# Compile and link options
|
||||||
@@ -558,7 +558,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
|||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||||
set(CPU_OPTION -msse2 -mfpmath=sse)
|
set(CPU_OPTION -msse2 -mfpmath=sse)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
@@ -580,12 +580,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
|||||||
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
|
$<$<COMPILE_LANGUAGE:CXX>:-fpermissive>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
|
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-enum-enum-conversion>
|
||||||
-pthread
|
-pthread
|
||||||
${CPU_OPTION}
|
${CPU_OPTION}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_options(${PROJECT_NAME} PRIVATE
|
target_link_options(${PROJECT_NAME} PRIVATE
|
||||||
-pthread
|
-pthread
|
||||||
#-fsanitize=address
|
#-fsanitize=address
|
||||||
-Wl,-export-dynamic
|
-Wl,-export-dynamic
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -594,22 +594,22 @@ endif()
|
|||||||
# Pre build events
|
# Pre build events
|
||||||
################################################################################
|
################################################################################
|
||||||
if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${PROJECT_NAME}
|
TARGET ${PROJECT_NAME}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/extractor ${CMAKE_BINARY_DIR}/soh/assets
|
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/extractor ${CMAKE_BINARY_DIR}/soh/assets
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/xml ${CMAKE_BINARY_DIR}/soh/assets/xml
|
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/xml ${CMAKE_BINARY_DIR}/soh/assets/xml
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${PROJECT_NAME}
|
TARGET ${PROJECT_NAME}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMENT "Copying asset xmls..."
|
COMMENT "Copying asset xmls..."
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/extractor $<TARGET_FILE_DIR:soh>/assets
|
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/extractor $<TARGET_FILE_DIR:soh>/assets
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/xml $<TARGET_FILE_DIR:soh>/assets/xml
|
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/soh/assets/xml $<TARGET_FILE_DIR:soh>/assets/xml
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:soh>/assets/symbols
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:soh>/assets/symbols
|
||||||
# COMMAND ${VS_COPY_ASSETS_CMD}
|
# COMMAND ${VS_COPY_ASSETS_CMD}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -626,49 +626,49 @@ endif()
|
|||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
find_package(glfw3 REQUIRED)
|
find_package(glfw3 REQUIRED)
|
||||||
find_package(Ogg CONFIG REQUIRED)
|
find_package(Ogg CONFIG REQUIRED)
|
||||||
link_libraries(Ogg::ogg)
|
link_libraries(Ogg::ogg)
|
||||||
|
|
||||||
find_package(Vorbis CONFIG REQUIRED)
|
find_package(Vorbis CONFIG REQUIRED)
|
||||||
link_libraries(Vorbis::vorbisfile)
|
link_libraries(Vorbis::vorbisfile)
|
||||||
find_package(Opus CONFIG REQUIRED)
|
find_package(Opus CONFIG REQUIRED)
|
||||||
link_libraries(Opus::opus)
|
link_libraries(Opus::opus)
|
||||||
find_package(OpusFile CONFIG REQUIRED)
|
find_package(OpusFile CONFIG REQUIRED)
|
||||||
link_libraries(OpusFile::opusfile CONFIG REQUIRED)
|
link_libraries(OpusFile::opusfile CONFIG REQUIRED)
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||||
"libultraship;"
|
"libultraship;"
|
||||||
"ZAPDLib;"
|
"ZAPDLib;"
|
||||||
"glu32;"
|
"glu32;"
|
||||||
"SDL2::SDL2;"
|
"SDL2::SDL2;"
|
||||||
"SDL2::SDL2main;"
|
"SDL2::SDL2main;"
|
||||||
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net-static>"
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net-static>"
|
||||||
"glfw;"
|
"glfw;"
|
||||||
"winmm;"
|
"winmm;"
|
||||||
"imm32;"
|
"imm32;"
|
||||||
"version;"
|
"version;"
|
||||||
"setupapi"
|
"setupapi"
|
||||||
"Ogg::ogg"
|
"Ogg::ogg"
|
||||||
"Opus::opus"
|
"Opus::opus"
|
||||||
"Vorbis::vorbis"
|
"Vorbis::vorbis"
|
||||||
"Vorbis::vorbisenc"
|
"Vorbis::vorbisenc"
|
||||||
"Vorbis::vorbisfile"
|
"Vorbis::vorbisfile"
|
||||||
"OpusFile::opusfile"
|
"OpusFile::opusfile"
|
||||||
)
|
)
|
||||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||||
"libultraship;"
|
"libultraship;"
|
||||||
"ZAPDLib;"
|
"ZAPDLib;"
|
||||||
"glu32;"
|
"glu32;"
|
||||||
"SDL2::SDL2;"
|
"SDL2::SDL2;"
|
||||||
"SDL2::SDL2main;"
|
"SDL2::SDL2main;"
|
||||||
"glfw;"
|
"glfw;"
|
||||||
"winmm;"
|
"winmm;"
|
||||||
"imm32;"
|
"imm32;"
|
||||||
"version;"
|
"version;"
|
||||||
"setupapi"
|
"setupapi"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
||||||
find_package(SDL2)
|
find_package(SDL2)
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
@@ -694,25 +694,24 @@ else()
|
|||||||
find_package(SDL2)
|
find_package(SDL2)
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Ogg REQUIRED)
|
||||||
find_package(Ogg REQUIRED)
|
find_package(Vorbis REQUIRED)
|
||||||
find_package(Vorbis REQUIRED)
|
find_package(Opus REQUIRED)
|
||||||
find_package(Opus REQUIRED)
|
find_package(OpusFile REQUIRED)
|
||||||
find_package(OpusFile REQUIRED)
|
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
"libultraship;"
|
||||||
"libultraship;"
|
"ZAPDLib;"
|
||||||
"ZAPDLib;"
|
SDL2::SDL2
|
||||||
SDL2::SDL2
|
"Ogg::ogg"
|
||||||
"Ogg::ogg"
|
"Vorbis::vorbis"
|
||||||
"Vorbis::vorbis"
|
"Vorbis::vorbisenc"
|
||||||
"Vorbis::vorbisenc"
|
"Vorbis::vorbisfile"
|
||||||
"Vorbis::vorbisfile"
|
"Opus::opus"
|
||||||
"Opus::opus"
|
"Opusfile::Opusfile"
|
||||||
"Opusfile::Opusfile"
|
|
||||||
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net>"
|
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net>"
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|NintendoSwitch|CafeOS")
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|NintendoSwitch|CafeOS")
|
||||||
@@ -765,10 +764,10 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "CafeOS")
|
|||||||
wut_create_rpx(${PROJECT_NAME})
|
wut_create_rpx(${PROJECT_NAME})
|
||||||
|
|
||||||
wut_create_wuhb(${PROJECT_NAME}
|
wut_create_wuhb(${PROJECT_NAME}
|
||||||
NAME "Ship of Harkinian"
|
NAME "Ship of Harkinian"
|
||||||
SHORTNAME "SoH"
|
SHORTNAME "SoH"
|
||||||
AUTHOR "${PROJECT_TEAM}"
|
AUTHOR "${PROJECT_TEAM}"
|
||||||
ICON ${CMAKE_CURRENT_SOURCE_DIR}/icon.jpg
|
ICON ${CMAKE_CURRENT_SOURCE_DIR}/icon.jpg
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/soh.rpx ${CMAKE_CURRENT_BINARY_DIR}/soh.wuhb DESTINATION . COMPONENT ship)
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/soh.rpx ${CMAKE_CURRENT_BINARY_DIR}/soh.wuhb DESTINATION . COMPONENT ship)
|
||||||
|
|||||||
Reference in New Issue
Block a user