build: Make editor resources path absolute

This commit is contained in:
Huseyn Ismayilov 2024-11-22 20:15:11 +04:00
parent 21bf477624
commit 7e09d5b537

View File

@ -14,7 +14,7 @@ add_executable(${NAME})
# Add resources folder # Add resources folder
if(CMAKE_BUILD_TYPE STREQUAL "Release") if(CMAKE_BUILD_TYPE STREQUAL "Release")
file(COPY ${EDITOR_RESOURCES_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${EDITOR_RESOURCES_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
target_compile_definitions(${NAME} PUBLIC EDITOR_RESOURCES_PATH="resources/") target_compile_definitions(${NAME} PUBLIC EDITOR_RESOURCES_PATH="${CMAKE_CURRENT_BINARY_DIR}/resources/")
else() else()
target_compile_definitions(${NAME} PUBLIC EDITOR_RESOURCES_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/") target_compile_definitions(${NAME} PUBLIC EDITOR_RESOURCES_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/")
endif() endif()