1 Star 0 Fork 0

min/MyRenderer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
dxy 提交于 2023-07-23 08:40 . update
cmake_minimum_required(VERSION 3.0.0)
project(MyRenderer VERSION 0.1.0)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)
file(GLOB_RECURSE SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE HEADER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h)
file(COPY ${HEADER_FILE} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/include)
if(NOT TARGET spdlog)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/spdlog)
endif()
if(NOT TARGET glfw)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/glfw)
endif()
if(NOT TARGET glad)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/glad)
endif()
if(NOT TARGET imgui)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/ImGui.cmake)
endif()
if(NOT TARGET glm)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/glm)
endif()
if(NOT TARGET stb_image)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/stb_image)
endif()
if(NOT TARGET assimp)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/assimp)
endif()
set(INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/spdlog/include
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/glfw/include
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/glad/include
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/ImGui
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/glm/glm
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/stb_image
${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/assimp/include
)
add_executable(${PROJECT_NAME} ${SOURCE_FILE} ${HEADER_FILE})
include_directories(${INCLUDE_DIRS})
target_include_directories(${PROJECT_NAME} PUBLIC ${INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} spdlog glfw glad imgui glm stb_image assimp)
########
# TEST #
########
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/min12344321/my-renderer.git
git@gitee.com:min12344321/my-renderer.git
min12344321
my-renderer
MyRenderer
master

搜索帮助