SET(VERSION_MAJOR 0)
SET(VERSION "${VERSION_MAJOR}.0.1")
-ADD_SUBDIRECTORY(client)
+ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(fido_svc_ui)
ADD_SUBDIRECTORY(server)
-ADD_DEPENDENCIES(fido-service fido-ui-service)
+ADD_SUBDIRECTORY(client)
+ADD_DEPENDENCIES(fido-service fido-client-common)
+ADD_DEPENDENCIES(org.tizen.fidosvcui fido-client-common)
+ADD_DEPENDENCIES(fido-client fido-client-common)
#INSTALL(DIRECTORY lib/fido/asm/ DESTINATION lib/fido/asm/)
ADD_SUBDIRECTORY(test/Dummy_ASM_DBUS)
-ADD_SUBDIRECTORY(test/shell_tc)
+##ADD_SUBDIRECTORY(test/shell_tc)
MESSAGE( STATUS "USE_JSON_BUILDER: " ${USE_JSON_BUILDER} )
if(NOT USE_JSON_BUILDER)
ADD_SUBDIRECTORY(test/Fido_Sample_RPM)
+SET(CLIENT_LIB fido-client)
+
SET(CLIENT_SRCS
fido_uaf_client.c
fido_uaf_authenticator.c
- ../common/fido_json_handler.c
- ../common/fido_b64_util.c
- ../common/fido_tlv_util.c
- ../common/fido_uaf_utils.c
)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
add_definitions(-DWITH_JSON_BUILDER)
endif()
-ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/common/fido-stub.c ${CMAKE_SOURCE_DIR}/common/fido-stub.h
-WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/common/
-COMMAND gdbus-codegen --interface-prefix org.tizen. --generate-c-code fido-stub ${CMAKE_SOURCE_DIR}/common/dbus_interfaces/fido.xml
-COMMENT "Generating FIDO GDBus stubs........................")
+ADD_LIBRARY(${CLIENT_LIB} SHARED ${CLIENT_SRCS})
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${CLIENT_SRCS} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
-ADD_DEPENDENCIES(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/common/fido-stub.h)
-ADD_DEPENDENCIES(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
-SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
-SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
+SET_TARGET_PROPERTIES(${CLIENT_LIB} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${CLIENT_LIB} PROPERTIES VERSION ${VERSION})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CLIENT_PKGS_LDFLAGS})
+TARGET_LINK_LIBRARIES(${CLIENT_LIB} ${CLIENT_PKGS_LDFLAGS} fido-client-common)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${CLIENT_LIB} DESTINATION ${LIBDIR})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/fido.h DESTINATION include)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/fido_uaf_authenticator.h DESTINATION include)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/fido_uaf_client.h DESTINATION include)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/common/fido_uaf_types.h DESTINATION include)
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc.in ${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc @ONLY)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc DESTINATION ${LIBDIR}/pkgconfig)
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/client/${CLIENT_LIB}.pc.in ${CMAKE_SOURCE_DIR}/client/${CLIENT_LIB}.pc @ONLY)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/client/${CLIENT_LIB}.pc DESTINATION ${LIBDIR}/pkgconfig)
--- /dev/null
+
+SET(FIDO_COMMON fido-client-common)
+
+SET(FIDO_COMMON_SRCS
+ fido_json_handler.c
+ fido_b64_util.c
+ fido_tlv_util.c
+ fido_uaf_utils.c
+)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(FIDO_COMMON_PKGS REQUIRED
+ dlog
+ glib-2.0
+ gio-unix-2.0
+ gobject-2.0
+ capi-base-common
+ json-glib-1.0
+ openssl
+)
+
+FOREACH(flag ${FIDO_COMMON_PKGS_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -Werror")
+SET(CMAKE_LDFLAGS "-Wl,-zdefs")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+
+if(USE_JSON_BUILDER)
+add_definitions(-DWITH_JSON_BUILDER)
+endif()
+
+ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/common/fido-stub.c ${CMAKE_SOURCE_DIR}/common/fido-stub.h
+WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/common/
+COMMAND gdbus-codegen --interface-prefix org.tizen. --generate-c-code fido-stub ${CMAKE_SOURCE_DIR}/common/dbus_interfaces/fido.xml
+COMMENT "Generating FIDO GDBus stubs........................")
+
+ADD_LIBRARY(${FIDO_COMMON} STATIC ${FIDO_COMMON_SRCS} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
+ADD_DEPENDENCIES(${FIDO_COMMON} ${CMAKE_SOURCE_DIR}/common/fido-stub.h)
+ADD_DEPENDENCIES(${FIDO_COMMON} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
+
+
+TARGET_LINK_LIBRARIES(${FIDO_COMMON} ${FIDO_COMMON_PKGS_LDFLAGS})
SET(EXTRA_CFLGAS "${EXTRA_CFLGAS} ${flag}")
ENDFOREACH(flag)
-ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/common/fido-stub.c ${CMAKE_SOURCE_DIR}/common/fido-stub.h
-WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/common/
-COMMAND gdbus-codegen --interface-prefix org.tizen. --generate-c-code fido-stub ${CMAKE_SOURCE_DIR}/common/dbus_interfaces/fido.xml
-COMMENT "Generating FIDO GDBus stubs........................")
-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE ${EXTRA_CFLGAS}")
-ADD_EXECUTABLE(${UI_PACKAGE_NAME} ${UI_SRCS} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
-ADD_DEPENDENCIES(${UI_PACKAGE_NAME} ${CMAKE_SOURCE_DIR}/common/fido-stub.h)
-ADD_DEPENDENCIES(${UI_PACKAGE_NAME} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
-TARGET_LINK_LIBRARIES(${UI_PACKAGE_NAME} "-pie" ${UI_PKGS_LDFLAGS})
+ADD_EXECUTABLE(${UI_PACKAGE_NAME} ${UI_SRCS})
+TARGET_LINK_LIBRARIES(${UI_PACKAGE_NAME} "-pie" ${UI_PKGS_LDFLAGS} fido-client-common)
CONFIGURE_FILE(${UI_PACKAGE_NAME}.xml.in ${UI_PACKAGE_NAME}.xml)
if(USE_JSON_BUILDER)
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*.h
-/opt/usr/devel/fido/tc/*
+##/opt/usr/devel/fido/tc/*
#################################################################################
fido_asm_plugin_manager.c
fido_uaf_policy_checker.c
fido_selection_ui_adaptor.c
- ../common/fido_uaf_utils.c
- ../common/fido_json_handler.c
- ../common/fido_tlv_util.c
fido_app_id_handler.c
- ../common/fido_b64_util.c
fido_privilege_checker.c
)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common)
-ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_SOURCE_DIR}/common/fido-stub.c ${CMAKE_SOURCE_DIR}/common/fido-stub.h
-WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/common/
-COMMAND gdbus-codegen --interface-prefix org.tizen. --generate-c-code fido-stub ${CMAKE_SOURCE_DIR}/common/dbus_interfaces/fido.xml
-COMMENT "Generating FIDO GDBus stubs........................")
-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -Werror")
SET(CMAKE_LDFLAGS "-Wl,-zdefs")
-ADD_EXECUTABLE(${SVC_DAEMON} ${SERVER_SRCS} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
-ADD_DEPENDENCIES(${SVC_DAEMON} ${CMAKE_SOURCE_DIR}/common/fido-stub.h)
-ADD_DEPENDENCIES(${SVC_DAEMON} ${CMAKE_SOURCE_DIR}/common/fido-stub.c)
+ADD_EXECUTABLE(${SVC_DAEMON} ${SERVER_SRCS})
-TARGET_LINK_LIBRARIES(${SVC_DAEMON} ${SERVER_pkgs_LDFLAGS})
+TARGET_LINK_LIBRARIES(${SVC_DAEMON} ${SERVER_pkgs_LDFLAGS} fido-client-common)
INSTALL(TARGETS ${SVC_DAEMON} DESTINATION bin)