Rename to DuckStation

This commit is contained in:
Connor McLaughlin 2019-10-04 13:54:09 +10:00
parent 92ec5a0a14
commit bddbab9d60
61 changed files with 43 additions and 54 deletions

View File

@ -1,10 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(pse C CXX)
# Options
option(ENABLE_OPENGL "Enables OpenGL support in renderer" ON)
option(ENABLE_SDL_FRONTEND "Compiles the SDL frontend" ON)
project(duckstation C CXX)
# Common include/library directories on Windows.
if(WIN32)
@ -22,14 +17,10 @@ if(WIN32)
endif()
endif()
if(ENABLE_SDL_FRONTEND)
set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/include/SDL")
set(SDL2_LIBRARIES "SDL2")
endif()
set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dep/msvc/include/SDL")
set(SDL2_LIBRARIES "SDL2")
else()
if(ENABLE_SDL_FRONTEND)
find_package(SDL2 REQUIRED)
endif()
find_package(SDL2 REQUIRED)
endif()

View File

@ -13,9 +13,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsamplerate", "dep\libsam
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "src\common\common.vcxproj", "{EE054E08-3799-4A59-A422-18259C105FFD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pse", "src\pse\pse.vcxproj", "{868B98C8-65A1-494B-8346-250A73A48C0A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "src\core\core.vcxproj", "{868B98C8-65A1-494B-8346-250A73A48C0A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pse-sdl", "src\pse-sdl\pse-sdl.vcxproj", "{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duckstation", "src\duckstation\duckstation.vcxproj", "{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YBaseLib", "dep\YBaseLib\Source\YBaseLib.vcxproj", "{B56CE698-7300-4FA5-9609-942F1D05C5A2}"
EndProject

View File

@ -1,5 +1,3 @@
add_subdirectory(common)
add_subdirectory(pse)
if(ENABLE_SDL_FRONTEND)
add_subdirectory(pse-sdl)
endif()
add_subdirectory(core)
add_subdirectory(duckstation)

16
src/core/CMakeLists.txt Normal file
View File

@ -0,0 +1,16 @@
add_library(core
cpu_bus.cpp
cpu_bus.h
cpu_bus.inl
cpu_core.cpp
cpu_core.h
cpu_core.inl
system.cpp
system.h
types.h
)
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(core Threads::Threads YBaseLib common)

View File

@ -472,5 +472,6 @@
<!-- ================ UNDUPOBJ ================ -->
<PropertyGroup Label="Globals">
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<ProjectName>core</ProjectName>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,11 @@
set(SRCS
main.cpp
sdl_audio_mixer.cpp
sdl_audio_mixer.h
sdl_interface.cpp
sdl_interface.h
)
add_executable(duckstation ${SRCS})
target_include_directories(duckstation PRIVATE "${SDL2_INCLUDE_DIRS}")
target_link_libraries(duckstation core imgui "${SDL2_LIBRARIES}")

View File

@ -44,7 +44,7 @@
<ProjectReference Include="..\common\common.vcxproj">
<Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project>
</ProjectReference>
<ProjectReference Include="..\pse\pse.vcxproj">
<ProjectReference Include="..\core\core.vcxproj">
<Project>{868b98c8-65a1-494b-8346-250a73a48c0a}</Project>
</ProjectReference>
</ItemGroup>
@ -60,7 +60,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>pse-sdl</RootNamespace>
<RootNamespace>duckstation</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@ -1,8 +1,7 @@
#include "YBaseLib/Assert.h"
#include "YBaseLib/Log.h"
#include "YBaseLib/StringConverter.h"
#include "pse/system.h"
#include "pse/types.h"
#include "core/system.h"
#include "sdl_interface.h"
#include <SDL.h>
#include <cstdio>

View File

@ -5,9 +5,9 @@
#include "imgui.h"
#include "imgui_impl_opengl3.h"
#include "imgui_impl_sdl.h"
#include "pse/digital_controller.h"
#include "pse/memory_card.h"
#include "pse/system.h"
#include "core/digital_controller.h"
#include "core/memory_card.h"
#include "core/system.h"
#include <cinttypes>
#include <glad.h>
Log_SetChannel(SDLInterface);

View File

@ -3,7 +3,7 @@
#include "YBaseLib/Timer.h"
#include "common/gl_program.h"
#include "common/gl_texture.h"
#include "pse/host_interface.h"
#include "core/host_interface.h"
#include <SDL.h>
#include <array>
#include <deque>

View File

@ -1,11 +0,0 @@
set(SRCS
main.cpp
sdl_audio_mixer.cpp
sdl_audio_mixer.h
sdl_interface.cpp
sdl_interface.h
)
add_executable(pse-sdl ${SRCS})
target_include_directories(pse-sdl PRIVATE "${SDL2_INCLUDE_DIRS}")
target_link_libraries(pse-sdl pse imgui "${SDL2_LIBRARIES}")

View File

@ -1,16 +0,0 @@
add_library(pse
cpu_bus.cpp
cpu_bus.h
cpu_bus.inl
cpu_core.cpp
cpu_core.h
cpu_core.inl
system.cpp
system.h
types.h
)
target_include_directories(pse PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(pse PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(pse Threads::Threads YBaseLib common)