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 eba66fc
Show file tree
Hide file tree
Showing 12 changed files with 335 additions and 169 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.

4 changes: 2 additions & 2 deletions .github/workflows/deploy_linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build Linux
on: [push,pull_request]
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -15,7 +15,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
14 changes: 3 additions & 11 deletions .github/workflows/deploy_mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build macOS
on: [push,pull_request]
on: [push]
jobs:
build-and-deploy:
runs-on: macos-latest
Expand All @@ -10,21 +10,13 @@ jobs:
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.

4 changes: 2 additions & 2 deletions .github/workflows/deploy_win.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build Windows
on: [push,pull_request]
on: [push]
jobs:
build-and-deploy:
runs-on: windows-2019
Expand All @@ -14,7 +14,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
17 changes: 16 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 @@ -297,7 +305,7 @@ elseif(MACOS OR IOS)
set_property(TARGET ${PROJECT_NAME} PROPERTY MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ios-info.plist.in")
set_target_properties(${PROJECT_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
endif()
elseif(ANDROID)
elseif(ANDROID OR STANDALONE_CORE)
add_library(${PROJECT_NAME} SHARED ${SKYEMU_SRC})
else()
add_executable(${PROJECT_NAME} ${SKYEMU_SRC})
Expand Down Expand Up @@ -340,3 +348,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 eba66fc

Please sign in to comment.