From b3e3f0c8b56d90904de76dea69fa74bb36916dd3 Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Tue, 13 Feb 2018 08:20:09 +0900 Subject: [PATCH] Fix build error due to CMakefile Change-Id: Ifb0649616437e1d003d2ceb96600f91c34a79acc --- CMakeLists.txt | 33 ++++++++++----------------------- capi-media-image-util.pc.in | 2 +- 2 files changed, 11 insertions(+), 24 deletions(-) mode change 100644 => 100755 capi-media-image-util.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c1d64f..0b97466 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,29 +1,16 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -# project -SET(project_prefix "capi") -SET(prefix "/usr") -SET(version "0.0.1") -SET(maintainer "Seungkeun Lee , Kangho Hur") -SET(description "A Image Utility library in Tizen Native API") -SET(service "media") -SET(submodule "image-util") - -# for package file -SET(dependents "dlog mmutil-bmp mmutil-common mmutil-gif mmutil-png mmutil-jpeg mmutil-imgp capi-base-common capi-media-tool glib-2.0 gmodule-2.0") -SET(pc_dependents "dlog capi-base-common capi-media-tool") - -SET(fw_name "${project_prefix}-${service}-${submodule}") +SET(fw_name "capi-media-image-util") PROJECT(${fw_name}) -SET(CMAKE_INSTALL_PREFIX ${prefix}) +SET(CMAKE_INSTALL_PREFIX /usr) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -SET(VERSION ${version}) - SET(INC_DIR include) INCLUDE_DIRECTORIES(${INC_DIR}) +# for package file +SET(dependents "dlog mmutil-bmp mmutil-common mmutil-gif mmutil-png mmutil-jpeg mmutil-imgp capi-base-common capi-media-tool glib-2.0") +SET(pc_dependents "dlog capi-base-common capi-media-tool") INCLUDE(FindPkgConfig) pkg_check_modules(${fw_name} REQUIRED ${dependents}) FOREACH(flag ${${fw_name}_CFLAGS}) @@ -33,9 +20,9 @@ ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") -IF("${ARCH}" MATCHES "^arm.*") +IF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") -ENDIF("${ARCH}" MATCHES "^arm.*") +ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DTIZEN_DEBUG") @@ -57,10 +44,9 @@ SET_TARGET_PROPERTIES(${fw_name} CLEAN_DIRECT_OUTPUT 1 ) - INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) INSTALL( - DIRECTORY ${INC_DIR}/ DESTINATION include/${service} + DIRECTORY ${INC_DIR}/ DESTINATION include/media FILES_MATCHING PATTERN "*_private.h" EXCLUDE PATTERN "${INC_DIR}/*.h" @@ -69,9 +55,10 @@ INSTALL( SET(PC_NAME ${fw_name}) SET(PC_REQUIRED ${pc_dependents}) SET(PC_LDFLAGS -l${fw_name}) +SET(PC_FILE_NAME ${fw_name}.pc.in) CONFIGURE_FILE( - ${fw_name}.pc.in + ${PC_FILE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc @ONLY ) diff --git a/capi-media-image-util.pc.in b/capi-media-image-util.pc.in old mode 100644 new mode 100755 index 208f8c0..1508489 --- a/capi-media-image-util.pc.in +++ b/capi-media-image-util.pc.in @@ -9,7 +9,7 @@ includedir=/usr/include/media Name: @PC_NAME@ Description: @PACKAGE_DESCRIPTION@ Version: @VERSION@ -Requires: @PC_REQUIRED@ capi-media-tool mm-common +Requires: @PC_REQUIRED@ Libs: -L${libdir} @PC_LDFLAGS@ Cflags: -I${includedir} -- 2.7.4