Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jss2a98aj committed Dec 4, 2024
1 parent b554e1b commit 8bdd1b4
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -14,20 +14,29 @@ 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
COMMAND ${CMAKE_COMMAND} -E copy_directory
${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)

0 comments on commit 8bdd1b4

Please sign in to comment.