aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 7c6221e52dd79c9785018854f34ccde42bc9d3e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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