cmake_minimum_required (VERSION 3.0)

project (mountd)

ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)

set (CMAKE_MODULE_PATH "${MODULE_PATH}")

set(DISABLE_TARGET_OPTIMIZATION ON)

include (br)

# mountd
add_executable (mountd 

	$ENV{SRC_DIR}/src/3P/mountd/main.c
	$ENV{SRC_DIR}/src/3P/mountd/log.c
	$ENV{SRC_DIR}/src/3P/mountd/sys.c
	$ENV{SRC_DIR}/src/3P/mountd/autofs.c
	$ENV{SRC_DIR}/src/3P/mountd/mount.c
	$ENV{SRC_DIR}/src/3P/mountd/timer.c
	$ENV{SRC_DIR}/src/3P/mountd/signal.c
	$ENV{SRC_DIR}/src/3P/mountd/ucix.c
	$ENV{SRC_DIR}/src/3P/mountd/led.c
	$ENV{SRC_DIR}/src/3P/mountd/fs.c
	$ENV{SRC_DIR}/src/3P/mountd/ucix.c
)

target_link_libraries (mountd ubox uci)
install (TARGETS mountd RUNTIME DESTINATION ../sbin)
