From 8bdd1b4671084a601cf8c1a32a6e4e2f79cf3eb4 Mon Sep 17 00:00:00 2001 From: jss2a98aj Date: Wed, 4 Dec 2024 08:48:10 -0500 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7993661..173ba38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -project(SBPatchHelper VERSION 0.1.0 LANGUAGES C CXX) +project(SBPatchHelper VERSION 0.1.1 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -14,8 +14,17 @@ FetchContent_Declare(json FetchContent_MakeAvailable(json) -add_executable(sbpatchhelper starbound_patch_helper.cpp global_settings.cpp json_intermediary_writer.cpp json_patch_writer.cpp parse_settings.cpp patch_style_settings.cpp user_interaction_helper.cpp utilities.cpp) -target_link_libraries(sbpatchhelper nlohmann_json::nlohmann_json) +add_executable(${PROJECT_NAME} + starbound_patch_helper.cpp + global_settings.cpp + json_intermediary_writer.cpp + json_patch_writer.cpp + parse_settings.cpp + patch_style_settings.cpp + user_interaction_helper.cpp + utilities.cpp +) +target_link_libraries(${PROJECT_NAME} nlohmann_json::nlohmann_json) #TODO: Figure out why PROJECT_BINARY_DIR is not the actual folder the binary goes in when building. add_custom_target(copy_config ALL @@ -23,11 +32,11 @@ add_custom_target(copy_config ALL ${PROJECT_SOURCE_DIR}/config ${PROJECT_BINARY_DIR}/Debug/config COMMENT "Copying config into binary directory") -add_dependencies(sbpatchhelper copy_config) +add_dependencies(${PROJECT_NAME} copy_config) add_custom_target(copy_source_assets ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/source_assets ${PROJECT_BINARY_DIR}/Debug/source_assets COMMENT "Copying source_assets into binary directory") -add_dependencies(sbpatchhelper copy_source_assets) +add_dependencies(${PROJECT_NAME} copy_source_assets)