summaryrefslogtreecommitdiff
blob: 005549ade1e7143815246e9ca9eaf14f51452d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Julian Ospald <hasufell@gentoo.org>
Date: Fri Aug 31 23:45:34 UTC 2012
Subject: fix as-needed

reorder linker line (curl after libircclient)

--- source/shared_lib/CMakeLists.txt
+++ source/shared_lib/CMakeLists.txt
@@ -47,9 +47,7 @@
 
 	FIND_PACKAGE(CURL REQUIRED)
 	INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
-	IF(UNIX)
-		SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES})
-	ENDIF()
+
 	# check libcurl version #
 	IF(WIN32)
 		file (READ ${PROJECT_SOURCE_DIR}${CURL_INCLUDE_DIR}/curl/curlver.h CURL_VERSION_H_CONTENTS)
@@ -308,6 +306,11 @@
 	INCLUDE_DIRECTORIES(${IRCCLIENT_INCLUDE_DIR})
 	SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY})
 
+	# fix linking order, curl after libircclient
+	IF(UNIX)
+		SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES})
+	ENDIF()
+
         set(CMAKE_REQUIRED_INCLUDES "${IRCCLIENT_INCLUDE_DIR}")
         set(CMAKE_REQUIRED_LIBRARIES "${IRCCLIENT_LIBRARY}")
         include(CheckCXXSourceRuns)