From: Julian Ospald 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,6 @@ 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) @@ -293,6 +290,11 @@ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY}) endif() + # 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}") check_cxx_source_runs("