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
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")
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")