mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
cgi-io: cmake: fix libraries lookup
In order to make it compile properly in more environments. Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
committed by
John Crispin
parent
f22bd6116a
commit
fd47e99be4
@@ -5,6 +5,8 @@ PROJECT(cgi-io C)
|
|||||||
INCLUDE(CheckFunctionExists)
|
INCLUDE(CheckFunctionExists)
|
||||||
|
|
||||||
FIND_PATH(ubus_include_dir libubus.h)
|
FIND_PATH(ubus_include_dir libubus.h)
|
||||||
|
FIND_LIBRARY(ubox NAMES ubox)
|
||||||
|
FIND_LIBRARY(ubus NAMES ubus)
|
||||||
INCLUDE_DIRECTORIES(${ubus_include_dir})
|
INCLUDE_DIRECTORIES(${ubus_include_dir})
|
||||||
|
|
||||||
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
|
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
|
||||||
@@ -17,6 +19,6 @@ IF(APPLE)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ADD_EXECUTABLE(cgi-io main.c multipart_parser.c)
|
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)
|
INSTALL(TARGETS cgi-io RUNTIME DESTINATION sbin)
|
||||||
|
|||||||
Reference in New Issue
Block a user