Require libtota as shared 72/185572/1
authorSunmin Lee <sunm.lee@samsung.com>
Thu, 26 Jul 2018 07:27:52 +0000 (16:27 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Thu, 26 Jul 2018 07:31:25 +0000 (16:31 +0900)
As a default, make tota-ua (delta.ua) require libtota.so
instead of static one.

Change-Id: I7477e7ad6f2c60cdb1ae45d356a042c43a2534f3
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
CMakeLists.txt

index 34507ad..a51d900 100755 (executable)
@@ -10,43 +10,24 @@ SET(SRCS
        src/ua.c
 )
 
-
-
 STRING(FIND ${CMAKE_C_FLAGS} "mfloat-abi=hard" IFFOUND1)
 STRING(FIND ${CMAKE_C_FLAGS} "mhard-float" IFFOUND2)
 
-IF(${IFFOUND1} GREATER 0 OR ${IFFOUND2} GREATER 0)
-       MESSAGE("hard")
-       SET(LIBS
-               libtota.a
-       )
-ELSE(${IFFOUND1} GREATER 0 OR ${IFFOUND2} GREATER 0)
-       MESSAGE("soft")
-    SET(LIBS
-               libtota.a
-    )
-ENDIF(${IFFOUND1} GREATER 0 OR ${IFFOUND2} GREATER 0)
-
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/)
 
-
-SET(VENDOR "samsung")
 SET(PACKAGE ${PROJECT_NAME})
 SET(PKGNAME "${PACKAGE}")
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(BINDIR "${PREFIX}/bin")
 SET(PKGDIR "${PREFIX}/share/fota")
 SET(RESDIR "${PKGDIR}/res")
-SET(CFGDIR "${PKGDIR}/config")
 SET(EXECNAME "delta.ua")
 
-
 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
        SET(CMAKE_BUILD_TYPE "Release")
 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
 
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED
        tota
@@ -57,8 +38,6 @@ FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-
-
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -fPIE")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
@@ -79,7 +58,7 @@ ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed -pie")
 
 ADD_EXECUTABLE(${EXECNAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${EXECNAME} ${pkgs_LDFLAGS} ${LIBS})
+TARGET_LINK_LIBRARIES(${EXECNAME} ${pkgs_LDFLAGS})
 
 INSTALL(TARGETS ${EXECNAME} DESTINATION ${BINDIR})
 IF("${FOTA_GUI_TYPE}" STREQUAL "GUI_TW")