diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..85e1921 --- /dev/null +++ b/CMakeLists.txt | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.0) | ||
| 2 | |||
| 3 | project(xplorer) | ||
| 4 | |||
| 5 | set(CMAKE_C_STANDARD 17) | ||
| 6 | set(CMAKE_C_STANDARD_REQUIRED On) | ||
| 7 | set(CMAKE_C_EXTENSIONS Off) | ||
| 8 | |||
| 9 | set(SDL_DIR src/contrib/SDL-2.30.2) | ||
| 10 | set(TINYDIR_DIR src/contrib/tinydir-1.2.4) | ||
| 11 | |||
| 12 | add_subdirectory(${SDL_DIR}) | ||
| 13 | add_subdirectory(${TINYDIR_DIR}) | ||
| 14 | |||
| 15 | add_executable(xplorer | ||
| 16 | src/xplorer.c) | ||
| 17 | |||
| 18 | target_include_directories(xplorer PRIVATE | ||
| 19 | ${SDL_DIR}/include) | ||
| 20 | |||
| 21 | target_link_libraries(xplorer PRIVATE | ||
| 22 | SDL2-static | ||
| 23 | tinydir | ||
| 24 | ui) | ||
| 25 | |||
| 26 | target_compile_options(xplorer PRIVATE -Wall -Wextra -Wpedantic) | ||
