From 797b11f505fe40fb6f2f47509f588863f4299c7d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 28 Oct 2015 14:09:30 +0900 Subject: [PATCH] Remove unnecessary dependencies Change-Id: Iae70701970713212c91ddbbe2d3d230656613e3f Signed-off-by: Hwankyu Jhun --- include/syspopup.h | 4 ---- syspopup/CMakeLists.txt | 18 +++++++++--------- syspopup/syspopup-wayland.pc.in | 13 ------------- syspopup/syspopup-x.pc.in | 13 ------------- syspopup/syspopup.c | 1 + syspopup/syspopup.pc.in | 13 +++++++++++++ syspopup/syspopup_efl.c | 1 + 7 files changed, 24 insertions(+), 39 deletions(-) delete mode 100644 syspopup/syspopup-wayland.pc.in delete mode 100644 syspopup/syspopup-x.pc.in create mode 100644 syspopup/syspopup.pc.in diff --git a/include/syspopup.h b/include/syspopup.h index 80a8f8d..371dd0c 100755 --- a/include/syspopup.h +++ b/include/syspopup.h @@ -24,10 +24,6 @@ #ifndef __SYSPOPUP_H__ #define __SYSPOPUP_H__ -#ifndef WAYLAND -#include -#endif - #include #include diff --git a/syspopup/CMakeLists.txt b/syspopup/CMakeLists.txt index 5941566..bf66abb 100644 --- a/syspopup/CMakeLists.txt +++ b/syspopup/CMakeLists.txt @@ -20,11 +20,12 @@ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") INCLUDE(FindPkgConfig) SET(APPSVC_SPPPGS_CHECK_MODULES "dlog bundle sqlite3 glib-2.0 gio-2.0 evas elementary ecore ecore-input libtzplatform-config") +SET(pc_requires "bundle elementary") IF (with_wayland) - pkg_check_modules(sppkgs REQUIRED ${APPSVC_SPPPGS_CHECK_MODULES}) + pkg_check_modules(sppkgs REQUIRED ${APPSVC_SPPPGS_CHECK_MODULES}) ELSE (with_wayland) - pkg_check_modules(sppkgs REQUIRED ${APPSVC_SPPPGS_CHECK_MODULES} utilX ecore-x x11) + pkg_check_modules(sppkgs REQUIRED ${APPSVC_SPPPGS_CHECK_MODULES} utilX ecore-x x11) ENDIF (with_wayland) FOREACH(flag ${sppkgs_CFLAGS}) @@ -40,7 +41,7 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2") SET(CMAKE_SKIP_BUILD_RPATH true) -# Get uname value to set 'TARGET' definition +# Get uname value to set 'TARGET' definition # TODO: Is this needed? FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") @@ -62,13 +63,12 @@ add_library(syspopup SHARED syspopup.c syspopup_efl.c) target_link_libraries(syspopup syspopup_mods ${sppkgs_LDFLAGS}) SET_TARGET_PROPERTIES(syspopup PROPERTIES SOVERSION 0.1.0) +SET(PC_NAME libsyspopup) +SET(PC_REQUIRED ${pc_requires}) +SET(PC_LDFLAGS -lsyspopup) + # pkgconfig file -#CONFIGURE_FILE(syspopup.pc.in syspopup/syspopup.pc @ONLY) -IF (with_wayland) - CONFIGURE_FILE(syspopup-wayland.pc.in ${CMAKE_CURRENT_BINARY_DIR}/syspopup.pc @ONLY) -ELSE (with_wayland) - CONFIGURE_FILE(syspopup-x.pc.in ${CMAKE_CURRENT_BINARY_DIR}/syspopup.pc @ONLY) -ENDIF (with_wayland) +CONFIGURE_FILE(syspopup.pc.in ${CMAKE_CURRENT_BINARY_DIR}/syspopup.pc @ONLY) ### Install ### INSTALL(TARGETS syspopup DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) diff --git a/syspopup/syspopup-wayland.pc.in b/syspopup/syspopup-wayland.pc.in deleted file mode 100644 index 68c122a..0000000 --- a/syspopup/syspopup-wayland.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=@EXEC_PREFIX@ -libdir=@LIB_INSTALL_DIR@ -includedir=@INCLUDEDIR@ - -Name: libsyspopup -Description: system popup library for ui -Version: @VERSION@ -Requires: dlog bundle sqlite3 glib-2.0 elementary dbus-glib-1 -Libs: -L${libdir} -lsyspopup -Cflags: -I${includedir} diff --git a/syspopup/syspopup-x.pc.in b/syspopup/syspopup-x.pc.in deleted file mode 100644 index 5bbb491..0000000 --- a/syspopup/syspopup-x.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=@EXEC_PREFIX@ -libdir=@LIB_INSTALL_DIR@ -includedir=@INCLUDEDIR@ - -Name: libsyspopup -Description: system popup library for ui -Version: @VERSION@ -Requires: dlog bundle sqlite3 glib-2.0 elementary utilX ecore-x dbus-glib-1 -Libs: -L${libdir} -lsyspopup -Cflags: -I${includedir} diff --git a/syspopup/syspopup.c b/syspopup/syspopup.c index 3e3e36f..4757965 100755 --- a/syspopup/syspopup.c +++ b/syspopup/syspopup.c @@ -30,6 +30,7 @@ #include #include #include +#include #endif #define WIN_PROP_NAME "SYSTEM_POPUP" diff --git a/syspopup/syspopup.pc.in b/syspopup/syspopup.pc.in new file mode 100644 index 0000000..9790980 --- /dev/null +++ b/syspopup/syspopup.pc.in @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +prefix=@PREFIX@ +exec_prefix=@EXEC_PREFIX@ +libdir=@LIB_INSTALL_DIR@ +includedir=@INCLUDEDIR@ + +Name: @PC_NAME@ +Description: system popup library for ui +Version: @VERSION@ +Requires: @PC_REQUIRED@ +Libs: -L${libdir} @PC_LDFLAGS@ +Cflags: -I${includedir} diff --git a/syspopup/syspopup_efl.c b/syspopup/syspopup_efl.c index 3e1b4f2..1db6f2a 100755 --- a/syspopup/syspopup_efl.c +++ b/syspopup/syspopup_efl.c @@ -31,6 +31,7 @@ #ifndef WAYLAND #include +#include #endif #ifndef WAYLAND -- 2.7.4