2022-10-30 22:52:39 +08:00
|
|
|
cmake_minimum_required (VERSION 3.0.0)
|
|
|
|
project(EffekseerRendererGL)
|
|
|
|
|
|
|
|
#--------------------
|
|
|
|
# Files
|
|
|
|
|
|
|
|
file(GLOB_RECURSE LOCAL_SOURCES_Common ../EffekseerRendererCommon/*.h ../EffekseerRendererCommon/*.cpp)
|
|
|
|
|
|
|
|
list(APPEND LOCAL_SOURCES_Common
|
|
|
|
../EffekseerRendererCommon/TextureLoader.h
|
|
|
|
../EffekseerRendererCommon/TextureLoader.cpp)
|
|
|
|
|
|
|
|
source_group("EffekseerRendererCommon" FILES ${LOCAL_SOURCES_Common})
|
|
|
|
|
|
|
|
file(GLOB_RECURSE LOCAL_HEADERS_GL *.h)
|
|
|
|
file(GLOB_RECURSE LOCAL_SOURCES_GL *.cpp)
|
|
|
|
list(APPEND LOCAL_HEADERS_GL ../EffekseerMaterialCompiler/OpenGL/EffekseerMaterialCompilerGL.h)
|
|
|
|
list(APPEND LOCAL_SOURCES_GL ../EffekseerMaterialCompiler/OpenGL/EffekseerMaterialCompilerGL.cpp)
|
|
|
|
list(APPEND LOCAL_SOURCES_GL ../EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.h)
|
|
|
|
list(APPEND LOCAL_SOURCES_GL ../EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp)
|
|
|
|
list(APPEND LOCAL_SOURCES_GL ../EffekseerMaterialCompiler/Common/ShaderGeneratorCommon.h)
|
|
|
|
list(APPEND LOCAL_SOURCES_GL ../EffekseerMaterialCompiler/Common/ShaderGeneratorCommon.cpp)
|
|
|
|
|
|
|
|
FilterFolder("${LOCAL_HEADERS_GL}")
|
|
|
|
FilterFolder("${LOCAL_SOURCES_GL}")
|
|
|
|
|
|
|
|
set(LOCAL_SOURCES
|
|
|
|
${LOCAL_SOURCES_Common}
|
|
|
|
${LOCAL_HEADERS_GL}
|
|
|
|
${LOCAL_SOURCES_GL})
|
|
|
|
|
|
|
|
set(PublicHeader
|
|
|
|
EffekseerRendererGL.h)
|
|
|
|
|
|
|
|
#--------------------
|
|
|
|
# Projects
|
|
|
|
|
|
|
|
add_library(${PROJECT_NAME} STATIC ${LOCAL_SOURCES})
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/../Effekseer ${EFK_THIRDPARTY_INCLUDES})
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${PublicHeader}")
|
2022-11-15 12:21:50 +08:00
|
|
|
target_link_libraries(${PROJECT_NAME} Effekseer)
|
2022-10-30 22:52:39 +08:00
|
|
|
|
2023-03-11 22:10:18 +08:00
|
|
|
if (NOT (${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore"))
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
2024-03-19 21:33:02 +08:00
|
|
|
PUBLIC "${_AX_ROOT}/3rdparty/glad/include"
|
2023-07-06 16:09:54 +08:00
|
|
|
PUBLIC "${_AX_ROOT}/core"
|
2023-03-11 22:10:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} glad)
|
|
|
|
else()
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
2024-03-24 05:20:59 +08:00
|
|
|
PUBLIC "${_AX_ROOT}/3rdparty/angle/_x/include"
|
2023-07-06 16:09:54 +08:00
|
|
|
PUBLIC "${_AX_ROOT}/core"
|
2023-03-11 22:10:18 +08:00
|
|
|
)
|
|
|
|
endif()
|
2023-01-06 23:21:09 +08:00
|
|
|
|
2022-10-30 22:52:39 +08:00
|
|
|
if(CLANG_FORMAT_ENABLED)
|
|
|
|
clang_format(${PROJECT_NAME})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_LIBPNG_LOADER)
|
|
|
|
add_dependencies(${PROJECT_NAME} ExternalProject_zlib ExternalProject_libpng)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
#--------------------
|
|
|
|
# Install
|
|
|
|
|
2022-11-01 11:40:06 +08:00
|
|
|
# install(
|
|
|
|
# TARGETS ${PROJECT_NAME}
|
|
|
|
# EXPORT ${PROJECT_NAME}-export
|
|
|
|
# INCLUDES DESTINATION include/EffekseerRendererGL
|
|
|
|
# PUBLIC_HEADER DESTINATION include/EffekseerRendererGL
|
|
|
|
# ARCHIVE DESTINATION lib
|
|
|
|
# LIBRARY DESTINATION lib)
|
2022-10-30 22:52:39 +08:00
|
|
|
|
2022-11-01 11:40:06 +08:00
|
|
|
# install(
|
|
|
|
# EXPORT ${PROJECT_NAME}-export
|
|
|
|
# FILE ${PROJECT_NAME}-config.cmake
|
|
|
|
# DESTINATION lib/cmake
|
|
|
|
# EXPORT_LINK_INTERFACE_LIBRARIES)
|