Update net-p2p/eiskaltdcpp-lib to version 2.2.9_2
[dports.git] / net-p2p / eiskaltdcpp-lib / files / patch-eiskaltdcpp-gtk__CMakeLists.txt
1 --- ./eiskaltdcpp-gtk/CMakeLists.txt.orig       2011-10-02 18:12:43.000000000 +0300
2 +++ ./eiskaltdcpp-gtk/CMakeLists.txt    2011-10-10 11:10:30.000000000 +0300
3 @@ -12,7 +12,7 @@
4  
5  if (USE_LIBGNOME2)
6      message (STATUS "Building with LibGnome2 support")
7 -    find_package (LibGnome2 REQUIRED)
8 +    find_library(LIBGNOME2_LIBRARIES gnome-2)
9      set_property(SOURCE ${PROJECT_SOURCE_DIR}/src/sound.cc ${PROJECT_SOURCE_DIR}/src/settingsdialog.cc PROPERTY COMPILE_DEFINITIONS USE_MINIUPNP APPEND)
10      message (STATUS "Building without LibCanberra support")
11  elseif (USE_LIBCANBERRA)
12 @@ -26,7 +26,7 @@
13  
14  if (USE_LIBNOTIFY)
15      message (STATUS "Building with libnotify support")
16 -    set (LIBNOTIFY "-lnotify")
17 +    find_library(LIBNOTIFY notify)
18  else (USE_LIBNOTIFY)
19      message (STATUS "Building without libnotify support")
20  endif (USE_LIBNOTIFY)
21 @@ -39,7 +39,7 @@
22  set (GTK_SRCS @gtk_srcs@ PARENT_SCOPE)
23  set (GTK_HDRS @gtk_hdrs@ PARENT_SCOPE)
24  set (GTK_UI   @gtk_ui@   PARENT_SCOPE)
25 -set (GTHREAD "-lgthread-2.0")
26 +find_library (GTHREAD "gthread-2.0")
27  
28  if (USE_GTK)
29      set(GTK_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS})
30 @@ -74,6 +74,10 @@
31    list (APPEND LIBS ${LUA_LIBRARIES})
32  endif (LUA_SCRIPT)
33  
34 +if (USE_MINIUPNP OR FREE_SPACE_BAR_C)
35 +       list(APPEND LIBS extra)
36 +endif (USE_MINIUPNP OR FREE_SPACE_BAR_C)
37 +
38  add_executable (${PROJECT_NAME} MACOSX_BUNDLE WIN32
39                  ${gtk_srcs}
40                  )
41 @@ -124,10 +128,19 @@
42    add_definitions(-DCLIENT_RES_DIR="${CLIENT_DATA_DIR}/gtk/resources")
43  endif (APPLE)
44  
45 +if (BUILD_LIB)
46 +       set(DCPP_LIB dcpp)
47 +else (BUILD_LIB)
48 +       find_library(DCPP_LIB eiskaltdcpp)
49 +       if (DCPP_LIB)
50 +               message(STATUS "EiskaltDC++ shared library found at ${DCPP_LIB}")
51 +       endif (DCPP_LIB)
52 +endif (BUILD_LIB)
53 +
54  if (APPLE)
55 -  target_link_libraries (${PROJECT_NAME} ${LIBS} dcpp iconv intl)
56 +  target_link_libraries (${PROJECT_NAME} ${LIBS} ${DCPP_LIB} iconv intl)
57  else (APPLE)
58 -  target_link_libraries (${PROJECT_NAME} ${LIBS} dcpp)
59 +  target_link_libraries (${PROJECT_NAME} ${LIBS} ${DCPP_LIB})
60  endif (APPLE)
61  
62  if (UNIX)