Merge pull request #21 from coderloff/dev

build: Make editor resources path absolute to prevent losing the track
This commit is contained in:
Huseyn Ismayilov 2024-11-22 23:19:37 +04:00 committed by GitHub
commit f98c820003
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()