Kevin Lo writes:
> On Mon, Mar 01, 2021 at 11:07:52AM +0800, Kevin Lo wrote:
> > Hi,
> > 
> > This is a port of pidgin-skypeweb, a Skype (http) protocol plugin for Pidgi
> n.
> > I have tested it on amd64.
> > 
> > Comments or OK ?

CONFIGURE_ARGS =       -DCMAKE_SHARED_LINKER_FLAGS="-L${LOCALBASE}/lib"

This line should not be necessary. Removing it causes the build to fail,
which I assume is because of the 'link_directories()' call's relative
position within CMakeLists.txt (cmake's upstream documentation says
"The command will apply only to targets created after it is called").

Replace CONFIGURE_ARGS with this patch that moves it next to the call to
include_directories() (and push the patch upstream), and the port is ok
with me.

$OpenBSD$

Index: skypeweb/CMakeLists.txt
--- skypeweb/CMakeLists.txt.orig
+++ skypeweb/CMakeLists.txt
@@ -29,6 +29,10 @@ include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}/purple2compat
     )
 
+link_directories(
+    ${PURPLE_LIBRARY_DIRS}
+    )
+
 set(SRC_LIST
     skypeweb_connection.c
     skypeweb_contacts.c
@@ -47,11 +51,6 @@ target_link_libraries(${PROJECT_NAME}
     ${GLIB2_LIBRARIES}
     ${JSON-GLIB_LIBRARIES}
     )
-
-link_directories(
-    ${PURPLE_LIBRARY_DIRS}
-    )
-
 
 #install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
 exec_program("${PKG_CONFIG_EXECUTABLE} --variable=plugindir purple 2>/dev/null"

Reply via email to