aboutsummaryrefslogtreecommitdiff
path: root/tools/wdye/CMakeLists.txt
blob: 73872ee578f50485201924a475b984db33897f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cmake_minimum_required (VERSION 3.10)
project (wdye VERSION 1 DESCRIPTION "What did you expect?" LANGUAGES C)

set (CMAKE_C_STANDARD 99)
set (CMAKE_C_STANDARD_REQUIRED ON)
set (CMAKE_C_EXTENSIONS OFF)

# -Wunused-function is pretty annoying here, as everything is static
set (options -Wall -Wextra -Wno-unused-function)
add_compile_options ("$<$<CXX_COMPILER_ID:GNU>:${options}>")
add_compile_options ("$<$<CXX_COMPILER_ID:Clang>:${options}>")

set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../cmake")

find_package (Curses REQUIRED)
find_package (PkgConfig REQUIRED)
# TODO: Once written, check the lowest and highest usable version.
pkg_search_module (lua REQUIRED
	lua53 lua5.3 lua-5.3 lua54 lua5.4 lua-5.4 lua>=5.3)

add_executable (wdye wdye.c)
target_include_directories (wdye PUBLIC ${lua_INCLUDE_DIRS})
target_link_directories (wdye PUBLIC ${lua_LIBRARY_DIRS})
target_link_libraries (wdye PUBLIC ${CURSES_LIBRARIES} ${lua_LIBRARIES})