1 Star 0 Fork 0

sumcai/opengl_tutorial

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
sumcai 提交于 2021-11-02 23:46 . first commit
cmake_minimum_required( VERSION 3.10.0 )
project( opengl-proj )
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/shader" DST_DIR)
file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/shader" SRC_DIR)
if(MSVC)
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${DST_DIR})
execute_process(COMMAND cmd /C mklink /J ${DST_DIR} ${SRC_DIR})
elseif()
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${DST_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_DIR} ${DST_DIR})
endif()
# external glfw
set( GLFW_BUILD_DOCS OFF CACHE INTERNAL "" )
set( GLFW_BUILD_TESTS OFF CACHE INTERNAL "" )
set( GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "" )
add_subdirectory( external/glfw )
add_subdirectory( external/glew )
# external includes
include_directories( external/glm )
include_directories( external/glad/include )
include_directories( external/glew/include )
# application code
include_directories( "include" )
add_executable(
opengl-proj
"src/main.cpp"
"external/glad/src/glad.c" )
target_compile_features(
opengl-proj
PUBLIC cxx_std_11 )
target_link_libraries(
opengl-proj
PRIVATE glfw
PRIVATE libglew_static )
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sumcai/opengl_tutorial.git
git@gitee.com:sumcai/opengl_tutorial.git
sumcai
opengl_tutorial
opengl_tutorial
master

搜索帮助