summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5fb58a..82d0e33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,7 @@ OPTION(UCI_SUPPORT "UCI plugin support" ON)
OPTION(RTNL_SUPPORT "Route Netlink plugin support" ON)
OPTION(NL80211_SUPPORT "Wireless Netlink plugin support" ON)
OPTION(RESOLV_SUPPORT "NS resolve plugin support" ON)
+OPTION(STRUCT_SUPPORT "Struct plugin support" ON)
OPTION(LEGACY_SUPPORT "Support deprecated syntax features" ON)
@@ -151,6 +152,16 @@ IF(RESOLV_SUPPORT)
ENDIF()
ENDIF()
+IF(STRUCT_SUPPORT)
+ SET(LIBRARIES ${LIBRARIES} struct_lib)
+ ADD_LIBRARY(struct_lib MODULE lib/struct.c)
+ SET_TARGET_PROPERTIES(struct_lib PROPERTIES OUTPUT_NAME struct PREFIX "")
+ CHECK_FUNCTION_EXISTS(frexp FREXP_FUNCTION_EXISTS)
+ IF (NOT FREXP_FUNCTION_EXISTS)
+ TARGET_LINK_LIBRARIES(struct_lib m)
+ ENDIF()
+ENDIF()
+
IF(UNIT_TESTING)
ENABLE_TESTING()
ADD_DEFINITIONS(-DUNIT_TESTING)