diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-10-28 01:29:52 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-10-28 01:29:52 -0700 |
| commit | 16208f6f3b499103a19b1c3ae61d1cfd71ca102b (patch) | |
| tree | a9900e72516d817fc63e32f58eda3cee3c7e84b1 | |
| parent | ca56a2618dd306855a4ede4dbcc389d4c714cccd (diff) | |
chore: refactor move headers to include folder
| -rw-r--r-- | CMakeLists.txt | 11 | ||||
| -rw-r--r-- | include/markdown_translator.hpp (renamed from src/markdown_translator.h) | 0 | ||||
| -rw-r--r-- | src/main.cpp | 2 | ||||
| -rw-r--r-- | src/markdown_translator.cpp | 2 |
4 files changed, 4 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c6221e..57da80f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,20 +11,16 @@ else() add_compile_options(-Wall -Wextra -Wpedantic) endif() -# Debug information message(STATUS "Source directory: ${CMAKE_SOURCE_DIR}") message(STATUS "Binary directory: ${CMAKE_BINARY_DIR}") -message(STATUS "Source styles dir: ${CMAKE_SOURCE_DIR}/styles") -message(STATUS "Target styles dir: ${CMAKE_BINARY_DIR}/styles") -# Main executable links to the library add_executable(${PROJECT_NAME} src/main.cpp src/markdown_translator.cpp ) -# target_link_libraries(${PROJECT_NAME} PRIVATE mylib) -# Create a custom target that will always be built +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/include) + add_custom_target(copy_styles ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/styles @@ -33,8 +29,5 @@ add_custom_target(copy_styles ALL VERBATIM ) -# Make sure the styles are copied before the main executable is built add_dependencies(${PROJECT_NAME} copy_styles) - -# Create build/styles directory if it doesn't exist (as a fallback) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/styles) diff --git a/src/markdown_translator.h b/include/markdown_translator.hpp index 6c0c1bc..6c0c1bc 100644 --- a/src/markdown_translator.h +++ b/include/markdown_translator.hpp diff --git a/src/main.cpp b/src/main.cpp index 85433fe..82f16c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ #include <string> #include <sstream> #include <unordered_map> -#include "markdown_translator.h" +#include "markdown_translator.hpp" bool parseArguments(int argc, char* argv[], std::unordered_map<std::string, std::string>& params, std::string& inputFile) { if (argc < 2) { diff --git a/src/markdown_translator.cpp b/src/markdown_translator.cpp index 42b8ce5..6cd6bb8 100644 --- a/src/markdown_translator.cpp +++ b/src/markdown_translator.cpp @@ -1,4 +1,4 @@ -#include "markdown_translator.h" +#include "markdown_translator.hpp" #include <regex> #include <iostream> #include <algorithm> |
