CMakeLists.txt
| 1 | cmake_minimum_required(VERSION 3.0) |
| 2 | |
| 3 | project(orcsmasher LANGUAGES C) |
| 4 | |
| 5 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wno-type-limits") |
| 6 | |
| 7 | if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") |
| 8 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -g -fsanitize=address") |
| 9 | endif() |
| 10 | |
| 11 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) |
| 12 | include_directories(include) |
| 13 | file(GLOB SOURCES "src/*.c") |
| 14 | |
| 15 | set(CURSES_NEED_NCURSES TRUE) |
| 16 | set(CURSES_NEED_WIDE TRUE) |
| 17 | find_package(Curses REQUIRED) |
| 18 | include_directories(${CURSES_INCLUDE_DIR}) |
| 19 | |
| 20 | add_executable(orcsmasher ${SOURCES}) |
| 21 | target_link_libraries(orcsmasher ${CURSES_LIBRARIES} panelw) |
| 22 |