Skip to content

Commit

Permalink
Hydra core
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Nov 4, 2023
1 parent 0c3efd8 commit 11bbf90
Show file tree
Hide file tree
Showing 12 changed files with 346 additions and 175 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/deploy_android.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/deploy_freebsd.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/deploy_ios.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/deploy_linux.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Build Linux
on: [push,pull_request]
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -15,7 +16,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. && cmake --build .
cmake -DBUILD_HYDRA_CORE=1 .. && cmake --build .
- name: GH Release 🚀
# You may pin to the exact commit or the version.
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/deploy_mac.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
name: Build macOS
on: [push,pull_request]
on: [push]
jobs:
build-and-deploy:
runs-on: macos-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Configure & Build 🔧
run: |
mkdir build
cd build
cmake .. && cmake --build .
- name: Build DMG
run: |
cd build
brew install graphicsmagick imagemagick
npm install --global create-dmg
create-dmg --dmg-title=SkyEmu 'bin/SkyEmu.app' || true
ls
mv SkyEmu*.dmg "SkyEmu.dmg"
cmake -DBUILD_HYDRA_CORE=1 .. && cmake --build .
- name: GH Release 🚀
# You may pin to the exact commit or the version.
uses: actions/upload-artifact@v2
with:
name: MacOSRelease
path: build/SkyEmu.dmg
path: build/libSkyEmu.dylib
#uses: softprops/action-gh-release@v0.1.5
#with:
# # Note-worthy description of changes in release
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/deploy_web.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/deploy_win.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Build Windows
on: [push,pull_request]
on: [push]
jobs:
build-and-deploy:
runs-on: windows-2019
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get latest CMake and ninja
# Using 'latest' branch, the most recent CMake and ninja are installed.
uses: lukka/get-cmake@latest
Expand All @@ -14,7 +15,7 @@ jobs:
run: |
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 ..
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DBUILD_HYDRA_CORE=1 ..
cmake --build . --config Release
- name: GH Release 🚀
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/hydra/core"]
path = src/hydra/core
url = https://github.com/hydra-emu/core
19 changes: 18 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ if(NOT EMSCRIPTEN)
set(ENABLE_HTTP_CONTROL_SERVER 1)
endif()

if(BUILD_HYDRA_CORE)
set(STANDALONE_CORE 1)
endif()

if(STANDALONE_CORE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

#=== LIBRARY: cimgui + Dear ImGui
add_library(cimgui STATIC
src/cimgui/cimgui.cpp
Expand Down Expand Up @@ -276,7 +284,9 @@ if(IOS)
add_definitions(-DPLATFORM_IOS)
endif()

if(WIN32)
if (STANDALONE_CORE)
add_library(${PROJECT_NAME} SHARED ${SKYEMU_SRC})
elseif(WIN32)
set(APP_ICON_RESOURCE_WINDOWS "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/icons/appicon.rc")
add_executable(${PROJECT_NAME} WIN32 ${SKYEMU_SRC} ${APP_ICON_RESOURCE_WINDOWS})
elseif(MACOS OR IOS)
Expand Down Expand Up @@ -340,3 +350,10 @@ elseif(EMSCRIPTEN)
${CMAKE_CURRENT_BINARY_DIR}/bin)
endif()

if(BUILD_HYDRA_CORE)
project(hydra_core CXX)
add_library(hydra_core SHARED src/hydra/core.cxx)
set_source_files_properties(src/hydra/core.cxx PROPERTIES COMPILE_FLAGS "-std=c++20")
target_include_directories(hydra_core PRIVATE src/hydra/core/include/)
target_link_libraries(hydra_core PRIVATE SkyEmu)
endif()
1 change: 1 addition & 0 deletions src/hydra/core
Submodule core added at 1f567b
Loading

0 comments on commit 11bbf90

Please sign in to comment.