In order to make it compile properly in more environments.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
INCLUDE(CheckFunctionExists)
FIND_PATH(ubus_include_dir libubus.h)
+FIND_LIBRARY(ubox NAMES ubox)
+FIND_LIBRARY(ubus NAMES ubus)
INCLUDE_DIRECTORIES(${ubus_include_dir})
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
ENDIF()
ADD_EXECUTABLE(cgi-io main.c multipart_parser.c)
-TARGET_LINK_LIBRARIES(cgi-io ubox ubus)
+TARGET_LINK_LIBRARIES(cgi-io ${ubox} ${ubus})
INSTALL(TARGETS cgi-io RUNTIME DESTINATION sbin)