fix host build
[oweals/ucert.git] / CMakeLists.txt
index 5b63312..a44ff23 100644 (file)
@@ -7,6 +7,17 @@ SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 
 find_library(json NAMES json-c json)
 
-ADD_EXECUTABLE(ucert ucert.c)
+IF(UCERT_HOST_BUILD)
+ADD_DEFINITIONS(-DUCERT_HOST_BUILD)
+ENDIF()
+
+ADD_EXECUTABLE(ucert ucert.c usign-exec.c)
+IF(UCERT_FULL)
+ADD_DEFINITIONS(-DUCERT_FULL)
 TARGET_LINK_LIBRARIES(ucert ubox blobmsg_json ${json})
+ELSE()
+ADD_DEFINITIONS(-DUCERT_STRIP_MESSAGES)
+TARGET_LINK_LIBRARIES(ucert ubox)
+ENDIF()
+
 INSTALL(TARGETS ucert RUNTIME DESTINATION bin)