Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change directory structures to improve cmake usability #971

Merged
merged 4 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Dev/Cpp/Effekseer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ WarnError(${PROJECT_NAME})

foreach (file ${effekseer_public_h})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION include/Effekseer/${dir})
install(FILES ${file} DESTINATION include/${dir})
endforeach()

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/Effekseer>)
$<INSTALL_INTERFACE:include>)

install(
TARGETS ${PROJECT_NAME}
Expand Down
10 changes: 5 additions & 5 deletions Dev/Cpp/EffekseerMaterialEditor/Graphics/efkMat.Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
#include "efkMat.Graphics.h"

#include <Common/StringHelper.h>
#include <EffekseerRendererCommon/TextureLoader.h>
#include <IO/IO.h>
#include <TextureLoader.h>
#include <algorithm>
#include <fstream>
#include <iostream>

#include "../EffekseerMaterialCompiler/OpenGL/EffekseerMaterialCompilerGL.h"
#include "../EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h"
#include "../EffekseerRendererGL/EffekseerRenderer/EffekseerRendererGL.MaterialLoader.h"
#include "../EffekseerRendererGL/EffekseerRenderer/EffekseerRendererGL.Shader.h"
#include "../EffekseerRendererGL/EffekseerRendererGL.h"
#include <EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h>
#include <EffekseerRendererGL.h>
#include <EffekseerRendererGL/EffekseerRendererGL.MaterialLoader.h>
#include <EffekseerRendererGL/EffekseerRendererGL.Shader.h>

#define TINYOBJLOADER_IMPLEMENTATION
#include "../ThirdParty/tiny_obj_loader.h"
Expand Down
4 changes: 2 additions & 2 deletions Dev/Cpp/EffekseerMaterialEditor/efkMat.Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

#include <ImGradientHDR.h>

#include "../Effekseer/Effekseer/Material/Effekseer.MaterialFile.h"
#include "../EffekseerMaterialCompiler/OpenGL/EffekseerMaterialCompilerGL.h"
#include "../EffekseerRendererGL/EffekseerRenderer/EffekseerRendererGL.MaterialLoader.h"
#include <Effekseer/Material/Effekseer.MaterialFile.h>
#include <EffekseerRendererGL/EffekseerRendererGL.MaterialLoader.h>

#include <boxer.h>

Expand Down
78 changes: 39 additions & 39 deletions Dev/Cpp/EffekseerRendererCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,48 @@ cmake_minimum_required(VERSION 3.1)
# Setup source codes

set(PublicHeaders
EffekseerRenderer.Renderer.h
EffekseerRenderer.RenderStateBase.h
EffekseerRenderer.ModelRendererBase.h
EffekseerRenderer.RibbonRendererBase.h
EffekseerRenderer.RingRendererBase.h
EffekseerRenderer.SpriteRendererBase.h
EffekseerRenderer.StandardRenderer.h
EffekseerRenderer.TrackRendererBase.h
EffekseerRenderer.CommonUtils.h
EffekseerRenderer.ShaderBase.h
EffekseerRenderer.Renderer_Impl.h
GraphicsDeviceCPU.h
ModelLoader.h
TextureLoader.h
VertexBuffer.h
EffekseerRendererCommon/EffekseerRenderer.Renderer.h
EffekseerRendererCommon/EffekseerRenderer.RenderStateBase.h
EffekseerRendererCommon/EffekseerRenderer.ModelRendererBase.h
EffekseerRendererCommon/EffekseerRenderer.RibbonRendererBase.h
EffekseerRendererCommon/EffekseerRenderer.RingRendererBase.h
EffekseerRendererCommon/EffekseerRenderer.SpriteRendererBase.h
EffekseerRendererCommon/EffekseerRenderer.StandardRenderer.h
EffekseerRendererCommon/EffekseerRenderer.TrackRendererBase.h
EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h
EffekseerRendererCommon/EffekseerRenderer.ShaderBase.h
EffekseerRendererCommon/EffekseerRenderer.Renderer_Impl.h
EffekseerRendererCommon/GraphicsDeviceCPU.h
EffekseerRendererCommon/ModelLoader.h
EffekseerRendererCommon/TextureLoader.h
EffekseerRendererCommon/VertexBuffer.h
)

set(LocalHeaders
EffekseerRendererFlags.h
EffekseerRenderer.CommonUtils.h
EffekseerRenderer.DDSTextureLoader.h
EffekseerRenderer.PngTextureLoader.h
EffekseerRenderer.TGATextureLoader.h
EffekseerRendererCommon/EffekseerRendererFlags.h
EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h
EffekseerRendererCommon/EffekseerRenderer.DDSTextureLoader.h
EffekseerRendererCommon/EffekseerRenderer.PngTextureLoader.h
EffekseerRendererCommon/EffekseerRenderer.TGATextureLoader.h
)

set(LocalSources
EffekseerRenderer.CommonUtils.cpp
EffekseerRenderer.DDSTextureLoader.cpp
EffekseerRenderer.ModelRendererBase.cpp
EffekseerRenderer.PngTextureLoader.cpp
EffekseerRenderer.Renderer.cpp
EffekseerRenderer.Renderer_Impl.cpp
EffekseerRenderer.RenderStateBase.cpp
EffekseerRenderer.RibbonRendererBase.cpp
EffekseerRenderer.RingRendererBase.cpp
EffekseerRenderer.SpriteRendererBase.cpp
EffekseerRenderer.TGATextureLoader.cpp
EffekseerRenderer.TrackRendererBase.cpp
GraphicsDeviceCPU.cpp
ModelLoader.cpp
TextureLoader.cpp
VertexBuffer.cpp
EffekseerRendererCommon/EffekseerRenderer.CommonUtils.cpp
EffekseerRendererCommon/EffekseerRenderer.DDSTextureLoader.cpp
EffekseerRendererCommon/EffekseerRenderer.ModelRendererBase.cpp
EffekseerRendererCommon/EffekseerRenderer.PngTextureLoader.cpp
EffekseerRendererCommon/EffekseerRenderer.Renderer.cpp
EffekseerRendererCommon/EffekseerRenderer.Renderer_Impl.cpp
EffekseerRendererCommon/EffekseerRenderer.RenderStateBase.cpp
EffekseerRendererCommon/EffekseerRenderer.RibbonRendererBase.cpp
EffekseerRendererCommon/EffekseerRenderer.RingRendererBase.cpp
EffekseerRendererCommon/EffekseerRenderer.SpriteRendererBase.cpp
EffekseerRendererCommon/EffekseerRenderer.TGATextureLoader.cpp
EffekseerRendererCommon/EffekseerRenderer.TrackRendererBase.cpp
EffekseerRendererCommon/GraphicsDeviceCPU.cpp
EffekseerRendererCommon/ModelLoader.cpp
EffekseerRendererCommon/TextureLoader.cpp
EffekseerRendererCommon/VertexBuffer.cpp
)

FilterFolder("${PublicHeaders}")
Expand All @@ -57,8 +57,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${EFK_THIRDPARTY_INCLUDES})
target_link_libraries(${PROJECT_NAME} PUBLIC Effekseer)

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>
$<INSTALL_INTERFACE:include/EffekseerRendererCommon>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)

if(USE_LIBPNG_LOADER)
Expand All @@ -82,7 +82,7 @@ set_target_properties(

foreach (file ${PublicHeaders})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION include/EffekseerRendererCommon/${dir})
install(FILES ${file} DESTINATION include/${dir})
endforeach()

install(
Expand Down
12 changes: 6 additions & 6 deletions Dev/Cpp/EffekseerRendererDX11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ set(LOCAL_SOURCES

set(PublicHeaders
EffekseerRendererDX11.h
EffekseerRenderer/EffekseerRendererDX11.Base.h
EffekseerRenderer/EffekseerRendererDX11.Base.Pre.h
EffekseerRenderer/EffekseerRendererDX11.Renderer.h)
EffekseerRendererDX11/EffekseerRendererDX11.Base.h
EffekseerRendererDX11/EffekseerRendererDX11.Base.Pre.h
EffekseerRendererDX11/EffekseerRendererDX11.Renderer.h)

#--------------------
# Projects

add_library(${PROJECT_NAME} STATIC ${LOCAL_SOURCES})
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/../Effekseer ${EFK_THIRDPARTY_INCLUDES})
target_include_directories(${PROJECT_NAME} PRIVATE ${EFK_THIRDPARTY_INCLUDES})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${PublicHeaders}")
target_link_libraries(${PROJECT_NAME} PUBLIC Effekseer EffekseerRendererCommon)

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/EffekseerRendererDX11>)
$<INSTALL_INTERFACE:include>)

if(CLANG_FORMAT_ENABLED)
clang_format(${PROJECT_NAME})
Expand All @@ -46,7 +46,7 @@ WarnError(${PROJECT_NAME})

foreach (file ${PublicHeaders})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION include/EffekseerRendererDX11/${dir})
install(FILES ${file} DESTINATION include/${dir})
endforeach()

install(
Expand Down
4 changes: 2 additions & 2 deletions Dev/Cpp/EffekseerRendererDX11/EffekseerRendererDX11.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef __EFFEKSEERRENDERER_DX11_H__
#define __EFFEKSEERRENDERER_DX11_H__

#include "EffekseerRenderer/EffekseerRendererDX11.Base.Pre.h"
#include "EffekseerRenderer/EffekseerRendererDX11.Renderer.h"
#include "EffekseerRendererDX11/EffekseerRendererDX11.Base.Pre.h"
#include "EffekseerRendererDX11/EffekseerRendererDX11.Renderer.h"

#endif // __EFFEKSEERRENDERER_DX11_H__
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//----------------------------------------------------------------------------------
// Include
//----------------------------------------------------------------------------------
#include "../../EffekseerRendererCommon/EffekseerRenderer.ModelRendererBase.h"
#include "EffekseerRendererDX11.RendererImplemented.h"
#include <EffekseerRendererCommon/EffekseerRenderer.ModelRendererBase.h>

//-----------------------------------------------------------------------------------
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
//----------------------------------------------------------------------------------
// Include
//----------------------------------------------------------------------------------
#include "../../EffekseerRendererCommon/EffekseerRenderer.RenderStateBase.h"
#include "EffekseerRendererDX11.Base.h"
#include "EffekseerRendererDX11.RendererImplemented.h"
#include <EffekseerRendererCommon/EffekseerRenderer.RenderStateBase.h>

//-----------------------------------------------------------------------------------
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#include "EffekseerRendererDX11.ModelRenderer.h"
#include "EffekseerRendererDX11.Shader.h"

#include "../../EffekseerRendererCommon/EffekseerRenderer.Renderer_Impl.h"
#include "../../EffekseerRendererCommon/EffekseerRenderer.RibbonRendererBase.h"
#include "../../EffekseerRendererCommon/EffekseerRenderer.RingRendererBase.h"
#include "../../EffekseerRendererCommon/EffekseerRenderer.SpriteRendererBase.h"
#include "../../EffekseerRendererCommon/EffekseerRenderer.TrackRendererBase.h"
#include "../../EffekseerRendererCommon/ModelLoader.h"
#include "../../EffekseerRendererCommon/TextureLoader.h"
#include <EffekseerRendererCommon/EffekseerRenderer.Renderer_Impl.h>
#include <EffekseerRendererCommon/EffekseerRenderer.RibbonRendererBase.h>
#include <EffekseerRendererCommon/EffekseerRenderer.RingRendererBase.h>
#include <EffekseerRendererCommon/EffekseerRenderer.SpriteRendererBase.h>
#include <EffekseerRendererCommon/EffekseerRenderer.TrackRendererBase.h>
#include <EffekseerRendererCommon/ModelLoader.h>
#include <EffekseerRendererCommon/TextureLoader.h>

//----------------------------------------------------------------------------------
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
//----------------------------------------------------------------------------------
// Include
//----------------------------------------------------------------------------------
#include "../../EffekseerRendererCommon/EffekseerRenderer.Renderer.h"
#include "EffekseerRendererDX11.Base.h"
#include <EffekseerRendererCommon/EffekseerRenderer.Renderer.h>

//----------------------------------------------------------------------------------
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
//----------------------------------------------------------------------------------
// Include
//----------------------------------------------------------------------------------
#include "../../EffekseerRendererCommon/EffekseerRenderer.RenderStateBase.h"
#include "../../EffekseerRendererCommon/EffekseerRenderer.StandardRenderer.h"
#include "EffekseerRendererDX11.Base.h"
#include "EffekseerRendererDX11.Renderer.h"
#include "GraphicsDevice.h"
#include <EffekseerRendererCommon/EffekseerRenderer.RenderStateBase.h>
#include <EffekseerRendererCommon/EffekseerRenderer.StandardRenderer.h>

#ifdef _WIN32
#include <xmmintrin.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#ifndef __EFFEKSEERRENDERER_DX11_SHADER_H__
#define __EFFEKSEERRENDERER_DX11_SHADER_H__

#include "../../EffekseerRendererCommon/EffekseerRenderer.ShaderBase.h"
#include "EffekseerRendererDX11.DeviceObject.h"
#include "EffekseerRendererDX11.RendererImplemented.h"
#include <EffekseerRendererCommon/EffekseerRenderer.ShaderBase.h>

namespace EffekseerRendererDX11
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "GraphicsDevice.h"
#include "../../EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h"
#include <EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h>

#include <d3dcompiler.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#ifndef __EFFEKSEERRENDERER_DX11_GRAPHICS_DEVICE_H__
#define __EFFEKSEERRENDERER_DX11_GRAPHICS_DEVICE_H__

#include "../../EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h"
#include <Effekseer.h>
#include <EffekseerRendererCommon/EffekseerRenderer.CommonUtils.h>
#include <assert.h>
#include <d3d11.h>
#include <set>
Expand Down
10 changes: 5 additions & 5 deletions Dev/Cpp/EffekseerRendererDX12/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ set(LOCAL_SOURCES

set(PublicHeaders
EffekseerRendererDX12.h
EffekseerRenderer/EffekseerRendererDX12.Base.Pre.h
EffekseerRenderer/EffekseerRendererDX12.Renderer.h)
EffekseerRendererDX12/EffekseerRendererDX12.Base.Pre.h
EffekseerRendererDX12/EffekseerRendererDX12.Renderer.h)

#--------------------
# Projects

add_library(${PROJECT_NAME} STATIC ${LOCAL_SOURCES})
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../Effekseer ${CMAKE_CURRENT_LIST_DIR}/../3rdparty/LLGI/src ${EFK_THIRDPARTY_INCLUDES})
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../3rdparty/LLGI/src ${EFK_THIRDPARTY_INCLUDES})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${PublicHeaders}")
target_link_libraries(${PROJECT_NAME} PUBLIC Effekseer EffekseerRendererCommon EffekseerRendererLLGI LLGI)

target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/EffekseerRendererDX12>)
$<INSTALL_INTERFACE:include>)

if(CLANG_FORMAT_ENABLED)
clang_format(${PROJECT_NAME})
Expand All @@ -45,7 +45,7 @@ WarnError(${PROJECT_NAME})

foreach (file ${PublicHeaders})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION include/EffekseerRendererDX12/${dir})
install(FILES ${file} DESTINATION include/${dir})
endforeach()

install(
Expand Down
6 changes: 3 additions & 3 deletions Dev/Cpp/EffekseerRendererDX12/EffekseerRendererDX12.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#ifndef __EFFEKSEERRENDERER_DX12_H__
#define __EFFEKSEERRENDERER_DX12_H__

#include "EffekseerRenderer/EffekseerRendererDX12.Base.Pre.h"
#include "EffekseerRenderer/EffekseerRendererDX12.Renderer.h"
#include <Common.h>
#include "EffekseerRendererDX12/EffekseerRendererDX12.Base.Pre.h"
#include "EffekseerRendererDX12/EffekseerRendererDX12.Renderer.h"
#include <EffekseerRendererLLGI/Common.h>

#endif // __EFFEKSEERRENDERER_DX12_H__
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

#include "EffekseerRendererDX12.Base.Pre.h"

#include "../../EffekseerRendererLLGI/EffekseerRendererLLGI.Base.h"
#include <EffekseerRendererLLGI/EffekseerRendererLLGI.Base.h>

#endif
Loading
Loading