From: Youngjae Cho Date: Wed, 15 Jan 2025 04:42:10 +0000 (+0900) Subject: Remove unnecessary linker flag on libsyscommon.pc X-Git-Tag: accepted/tizen/unified/20250122.093021~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6088f335bebd956d2580a7dcb319dd360460255c;p=platform%2Fcore%2Fsystem%2Flibsyscommon.git Remove unnecessary linker flag on libsyscommon.pc The linker flags pulled in by the variable SYSCOMMON_LIBS caused problem when the libsyscommon was linked to another program. The program might have located the libsyscommon by libsyscommon.pc. Because of this, the program might have added linker flags unintentionally that were, in fact, dependent to the libsyscommon, not the program itself. And this causes build error like: ld: cannot find -lcynara-creds-pid: No such file or directory The program didn't intend to link it to libcynara-creds-pid, and therefore the rpmbuild would also not have installed the library. But the linker flag -lcynara-creds-pid was pulled in by the libsyscommon.pc, so it makes build error. Change-Id: I81c2e4544f1c904527e4015aafb28ef0b2a659e9 Signed-off-by: Youngjae Cho --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 92a0050..bea15c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,10 +63,6 @@ FOREACH(flag ${syscommon_INCLUDE_DIRS}) SET(SYSCOMMON_INCLUDEDIR "${SYSCOMMON_INCLUDEDIR} -I${flag}") ENDFOREACH(flag) -FOREACH(flag ${syscommon_LIBRARIES}) - SET(SYSCOMMON_LIBS "${SYSCOMMON_LIBS} -l${flag}") -ENDFOREACH(flag) - CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) diff --git a/libsyscommon.pc.in b/libsyscommon.pc.in index 7f29eb3..3cfd5d6 100644 --- a/libsyscommon.pc.in +++ b/libsyscommon.pc.in @@ -14,4 +14,4 @@ Description: system common library Version: @VERSION@ Requires.private: gio-2.0 gio-unix-2.0 dlog json-c capi-system-info Cflags: -I${includedir} @SYSCOMMON_INCLUDEDIR@ -Libs: -L${libdir} -lsyscommon @SYSCOMMON_LIBS@ +Libs: -L${libdir} -lsyscommon