diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ffe96d..9fbe9b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ project ("xna") # Include sub-projects. include_directories(${PROJECT_INCLUDES_DIR}) add_subdirectory ("framework") +add_subdirectory ("framework-dx") add_subdirectory ("samples") diff --git a/framework-dx/CMakeLists.txt b/framework-dx/CMakeLists.txt new file mode 100644 index 0000000..217c339 --- /dev/null +++ b/framework-dx/CMakeLists.txt @@ -0,0 +1,38 @@ +# CMakeList.txt : CMake project for xna, include source and define +# project specific logic here. +# + +# Add source to this project's executable. +add_library (Xn65DX STATIC +"window.cpp" +"device.cpp" +"adapter.cpp" +"swapchain.cpp" +"rendertarget.cpp" +"texture.cpp" +"blendstate.cpp" +"game.cpp" +"gdevicemanager.cpp" +"rasterizerstate.cpp" +"samplerstate.cpp" +"sprite.cpp" +"depthstencilstate.cpp" +"keyboard.cpp" +"mouse.cpp" +"gamepad.cpp" +"soundeffect.cpp" +"displaymode.cpp" +"init.cpp" +"audioengine.cpp" +"effect.cpp" +"screen.cpp") + +if (CMAKE_VERSION VERSION_GREATER 3.12) + set_property(TARGET Xn65DX PROPERTY CXX_STANDARD 20) +endif() + +find_package(directxtk CONFIG REQUIRED) + +target_link_libraries( + Xn65DX Xn65 D3d11.lib dxgi.lib dxguid.lib d3dcompiler.lib Microsoft::DirectXTK dxguid.lib +) diff --git a/framework/platform-dx/adapter.cpp b/framework-dx/adapter.cpp similarity index 100% rename from framework/platform-dx/adapter.cpp rename to framework-dx/adapter.cpp diff --git a/framework/platform-dx/audioengine.cpp b/framework-dx/audioengine.cpp similarity index 100% rename from framework/platform-dx/audioengine.cpp rename to framework-dx/audioengine.cpp diff --git a/framework/platform-dx/blendstate.cpp b/framework-dx/blendstate.cpp similarity index 100% rename from framework/platform-dx/blendstate.cpp rename to framework-dx/blendstate.cpp diff --git a/framework/platform-dx/depthstencilstate.cpp b/framework-dx/depthstencilstate.cpp similarity index 100% rename from framework/platform-dx/depthstencilstate.cpp rename to framework-dx/depthstencilstate.cpp diff --git a/framework/platform-dx/device.cpp b/framework-dx/device.cpp similarity index 100% rename from framework/platform-dx/device.cpp rename to framework-dx/device.cpp diff --git a/framework/platform-dx/displaymode.cpp b/framework-dx/displaymode.cpp similarity index 100% rename from framework/platform-dx/displaymode.cpp rename to framework-dx/displaymode.cpp diff --git a/framework/platform-dx/effect.cpp b/framework-dx/effect.cpp similarity index 100% rename from framework/platform-dx/effect.cpp rename to framework-dx/effect.cpp diff --git a/framework/platform-dx/game.cpp b/framework-dx/game.cpp similarity index 100% rename from framework/platform-dx/game.cpp rename to framework-dx/game.cpp diff --git a/framework/platform-dx/gamepad.cpp b/framework-dx/gamepad.cpp similarity index 100% rename from framework/platform-dx/gamepad.cpp rename to framework-dx/gamepad.cpp diff --git a/framework/platform-dx/gdevicemanager.cpp b/framework-dx/gdevicemanager.cpp similarity index 100% rename from framework/platform-dx/gdevicemanager.cpp rename to framework-dx/gdevicemanager.cpp diff --git a/framework/platform-dx/init.cpp b/framework-dx/init.cpp similarity index 100% rename from framework/platform-dx/init.cpp rename to framework-dx/init.cpp diff --git a/framework/platform-dx/keyboard.cpp b/framework-dx/keyboard.cpp similarity index 100% rename from framework/platform-dx/keyboard.cpp rename to framework-dx/keyboard.cpp diff --git a/framework/platform-dx/mouse.cpp b/framework-dx/mouse.cpp similarity index 100% rename from framework/platform-dx/mouse.cpp rename to framework-dx/mouse.cpp diff --git a/framework/platform-dx/rasterizerstate.cpp b/framework-dx/rasterizerstate.cpp similarity index 100% rename from framework/platform-dx/rasterizerstate.cpp rename to framework-dx/rasterizerstate.cpp diff --git a/framework/platform-dx/rendertarget.cpp b/framework-dx/rendertarget.cpp similarity index 100% rename from framework/platform-dx/rendertarget.cpp rename to framework-dx/rendertarget.cpp diff --git a/framework/platform-dx/samplerstate.cpp b/framework-dx/samplerstate.cpp similarity index 100% rename from framework/platform-dx/samplerstate.cpp rename to framework-dx/samplerstate.cpp diff --git a/framework/platform-dx/screen.cpp b/framework-dx/screen.cpp similarity index 100% rename from framework/platform-dx/screen.cpp rename to framework-dx/screen.cpp diff --git a/framework/platform-dx/soundeffect.cpp b/framework-dx/soundeffect.cpp similarity index 100% rename from framework/platform-dx/soundeffect.cpp rename to framework-dx/soundeffect.cpp diff --git a/framework/platform-dx/sprite.cpp b/framework-dx/sprite.cpp similarity index 100% rename from framework/platform-dx/sprite.cpp rename to framework-dx/sprite.cpp diff --git a/framework/platform-dx/swapchain.cpp b/framework-dx/swapchain.cpp similarity index 100% rename from framework/platform-dx/swapchain.cpp rename to framework-dx/swapchain.cpp diff --git a/framework/platform-dx/texture.cpp b/framework-dx/texture.cpp similarity index 100% rename from framework/platform-dx/texture.cpp rename to framework-dx/texture.cpp diff --git a/framework/platform-dx/window.cpp b/framework-dx/window.cpp similarity index 100% rename from framework/platform-dx/window.cpp rename to framework-dx/window.cpp diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt index 0c82e8a..fd000b2 100644 --- a/framework/CMakeLists.txt +++ b/framework/CMakeLists.txt @@ -17,41 +17,10 @@ add_library (Xn65 STATIC "common/collision.cpp" "common/gjk.cpp" "common/numerics.cpp" -"common/packedvalue.cpp" -"platform-dx/window.cpp" -"platform-dx/device.cpp" -"platform-dx/adapter.cpp" -"platform-dx/swapchain.cpp" -"platform-dx/rendertarget.cpp" -"platform-dx/texture.cpp" -"platform-dx/blendstate.cpp" -"platform-dx/game.cpp" -"platform-dx/gdevicemanager.cpp" -"platform-dx/rasterizerstate.cpp" -"platform-dx/samplerstate.cpp" -"platform-dx/sprite.cpp" -"platform-dx/depthstencilstate.cpp" -"platform-dx/keyboard.cpp" -"platform-dx/mouse.cpp" -"platform-dx/gamepad.cpp" -"platform-dx/soundeffect.cpp" -"platform-dx/displaymode.cpp" -"platform-dx/init.cpp" -"platform-dx/audioengine.cpp" +"common/packedvalue.cpp" "graphics/gresource.cpp" -"platform-dx/effect.cpp" - "exception.cpp" "platform-dx/screen.cpp" ) +"exception.cpp") if (CMAKE_VERSION VERSION_GREATER 3.12) set_property(TARGET Xn65 PROPERTY CXX_STANDARD 20) endif() - -# TODO: Add tests and install targets if needed. - -find_package(directxtk CONFIG REQUIRED) - -target_link_libraries( - Xn65 D3d11.lib dxgi.lib dxguid.lib d3dcompiler.lib Microsoft::DirectXTK dxguid.lib - #"${PROJECT_INCLUDES_DIR}/libmspack/mspack.lib" - #"${PROJECT_INCLUDES_DIR}/effects11/Effects11.lib" -) diff --git a/samples/01_blank/CMakeLists.txt b/samples/01_blank/CMakeLists.txt index bba069c..9ecdeb3 100644 --- a/samples/01_blank/CMakeLists.txt +++ b/samples/01_blank/CMakeLists.txt @@ -10,4 +10,4 @@ if (CMAKE_VERSION VERSION_GREATER 3.12) endif() # TODO: Add tests and install targets if needed. -target_link_libraries(BlankApp Xn65) +target_link_libraries(BlankApp Xn65DX) diff --git a/samples/02_PlatfformerStarterKit/CMakeLists.txt b/samples/02_PlatfformerStarterKit/CMakeLists.txt index 29b791e..d145299 100644 --- a/samples/02_PlatfformerStarterKit/CMakeLists.txt +++ b/samples/02_PlatfformerStarterKit/CMakeLists.txt @@ -11,5 +11,5 @@ endif() # TODO: Add tests and install targets if needed. target_link_libraries( - PlatformApp Xn65 + PlatformApp Xn65DX ) \ No newline at end of file diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 45257e9..24ef843 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -4,4 +4,4 @@ # Add source to this project's executable. add_subdirectory ("01_blank") -add_subdirectory ("02_PlatfformerStarterKit") +#add_subdirectory ("02_PlatfformerStarterKit")