mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
Cria projeto de exemplos
This commit is contained in:
parent
b3473d414c
commit
329de1e523
@ -9,15 +9,13 @@ if (POLICY CMP0141)
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
|
||||
endif()
|
||||
|
||||
# Includes
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
||||
|
||||
# CMAKE_TOOLCHAIN_FILE
|
||||
include("C:/vcpkg/scripts/buildsystems/vcpkg.cmake")
|
||||
|
||||
project ("xna")
|
||||
|
||||
# Include sub-projects.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
|
||||
add_subdirectory ("framework")
|
||||
add_subdirectory ("samples")
|
||||
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
#
|
||||
|
||||
# Add source to this project's executable.
|
||||
add_executable (xna WIN32
|
||||
"xna.cpp"
|
||||
add_library (Xn65 STATIC
|
||||
"../samples/xna.cpp"
|
||||
"csharp/stream.cpp"
|
||||
"game/component.cpp"
|
||||
"content/manager.cpp"
|
||||
@ -45,11 +45,11 @@ add_executable (xna WIN32
|
||||
"platform-dx/audioengine.cpp" )
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||
set_property(TARGET xna PROPERTY CXX_STANDARD 20)
|
||||
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(${PROJECT_NAME} D3d11.lib dxgi.lib dxguid.lib d3dcompiler.lib Microsoft::DirectXTK)
|
||||
target_link_libraries(Xn65 D3d11.lib dxgi.lib dxguid.lib d3dcompiler.lib Microsoft::DirectXTK)
|
||||
|
13
samples/CMakeLists.txt
Normal file
13
samples/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# CMakeList.txt : CMake project for CmakeSharedExeTest, include source and define
|
||||
# project specific logic here.
|
||||
#
|
||||
|
||||
# Add source to this project's executable.
|
||||
add_executable (SampleApp WIN32 "xna.cpp")
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||||
set_property(TARGET SampleApp PROPERTY CXX_STANDARD 20)
|
||||
endif()
|
||||
|
||||
# TODO: Add tests and install targets if needed.
|
||||
target_link_libraries(SampleApp Xn65)
|
@ -27,7 +27,7 @@ namespace xna {
|
||||
void LoadContent() override {
|
||||
spriteBatch = New<SpriteBatch>(*graphicsDevice);
|
||||
|
||||
texture = Content()->Load<PTexture2D>("idle");
|
||||
texture = Content()->Load<PTexture2D>("sampleTexture");
|
||||
|
||||
Game::LoadContent();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user