changed project to use CLion to be cross platform
This commit is contained in:
parent
6fb3ffcfed
commit
dcc5871929
463 changed files with 69347 additions and 296 deletions
43
CMakeLists.txt
Normal file
43
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
cmake_minimum_required(VERSION 4.1)
|
||||
project(Engine2026)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include_directories(/
|
||||
vendor)
|
||||
|
||||
add_executable(Engine2026 main.cpp
|
||||
engine/shader.h
|
||||
engine/texture.h
|
||||
engine/mesh.h
|
||||
|
||||
vendor/glad/glad.c
|
||||
)
|
||||
|
||||
target_include_directories(Engine2026 PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/vendor")
|
||||
|
||||
target_link_libraries(Engine2026 PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/vendor/glfw/libglfw3.a" # Static MinGW lib - this fixes -lglfw not found
|
||||
opengl32
|
||||
gdi32
|
||||
user32
|
||||
)
|
||||
|
||||
# Copy entire folder (textures/, shaders/, models/, etc.)
|
||||
add_custom_command(
|
||||
TARGET Engine2026 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/assets" # adjust to your folder name
|
||||
"$<TARGET_FILE_DIR:Engine2026>/assets"
|
||||
COMMENT "Copying textures to output directory"
|
||||
)
|
||||
|
||||
# Repeat for other folders, e.g. shaders
|
||||
add_custom_command(
|
||||
TARGET Engine2026 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/assets"
|
||||
"$<TARGET_FILE_DIR:Engine2026>/assets"
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue