2024-07-29 15:59:40 +00:00
|
|
|
project(engine)
|
|
|
|
|
|
|
|
set(ENGINE_SOURCE_DIR src)
|
|
|
|
set(ENGINE_INCLUDE_DIR include)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE ENGINE_SOURCES ${ENGINE_SOURCE_DIR}/*.cpp)
|
|
|
|
|
|
|
|
add_library(${PROJECT_NAME})
|
|
|
|
|
2024-07-30 16:57:32 +00:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
|
|
target_compile_definitions(${PROJECT_NAME} PUBLIC RESOURCES_PATH="./resources/")
|
|
|
|
else()
|
2024-08-22 15:55:30 +00:00
|
|
|
target_compile_definitions(${PROJECT_NAME} PUBLIC RESOURCES_PATH="${CMAKE_SOURCE_DIR}/editor/resources/")
|
2024-07-30 16:57:32 +00:00
|
|
|
endif()
|
2024-07-29 15:59:40 +00:00
|
|
|
|
|
|
|
target_sources(${PROJECT_NAME} PRIVATE ${ENGINE_SOURCES})
|
2024-07-30 16:57:32 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${ENGINE_INCLUDE_DIR})
|
2024-07-29 15:59:40 +00:00
|
|
|
|
2024-08-22 15:55:30 +00:00
|
|
|
target_link_libraries(${PROJECT_NAME} glfw glad glm imgui stb)
|