From e3abe2c42d6766e0fb4b92e7804aa08668cf6b40 Mon Sep 17 00:00:00 2001 From: arizotaz Date: Tue, 28 Apr 2026 20:04:02 +0000 Subject: [PATCH] revert 8cbfa12c2a5795850edaf2a305a6f237a62ff2ca revert Add Release Scripts --- CMakeLists.txt | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a679d1..340398a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,25 +115,22 @@ set_property(TARGET "${CMAKE_PROJECT_NAME}" PROPERTY CXX_STANDARD 17) #======================================================================================== # CHANGE RESOURCES DEFINITION #======================================================================================== -# By default, when in debug mode. Resources are pulled from the folder in the root of -# the project. This is statically mapped. The value of RESOURCES_PATH become -# /home/user1/Projects/Project. Thats not very usefull for shipping the application as -# the user is unlikely to have your same folder structure. +# You will change which line is commented depending +# on if the compiled binary is for development or +# production. +# +# Uncomment the line below when in development, this uses the resources folder +# in the CMake project for the RESOURCES_PATH definition +target_compile_definitions("${CMAKE_PROJECT_NAME}" PUBLIC RESOURCES_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/") +# +# Uncomment the line below when in production, this uses a folder in the same working +# directory of the binary called "resources". Effectively RESOURCES_PATH +# becomes ./resources/. You would copy the resources folder of the cmake project +# and ship it will the compiled binary +#target_compile_definitions("${CMAKE_PROJECT_NAME}" PUBLIC RESOURCES_PATH="./resources/") # -# So in release mode, the value of RESOURCES_PATH become ./resources/ so it will use the -# resources folder in the same folder as the executable -target_compile_definitions("${CMAKE_PROJECT_NAME}" PUBLIC - RESOURCES_PATH="$<$:${CMAKE_CURRENT_SOURCE_DIR}/resources/>$<$:./resources/>" -) -# This copis the resources folder to the build location when in release mode -add_custom_command(TARGET "${CMAKE_PROJECT_NAME}" POST_BUILD - COMMAND $<$:${CMAKE_COMMAND}> - $<$:-E> - $<$:copy_directory> - $<$:"${CMAKE_CURRENT_SOURCE_DIR}/resources"> - $<$:"$/resources"> -) + # Add our sources