aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..7c6221e
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.16)
+project(FFXIV-MD-GENERATOR VERSION 0.1 LANGUAGES CXX)
+
+set(CMAKE_CXX_STANDARD 20)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+if (MSVC)
+ add_compile_options(/W4 /permissive-)
+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
+add_custom_target(copy_styles ALL
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${CMAKE_SOURCE_DIR}/styles
+ ${CMAKE_BINARY_DIR}/styles
+ COMMENT "Copying styles directory to build directory"
+ 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)
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage