From 9bc1e4335c44c00786de9dbaf3c787c5f5475c9e Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Tue, 24 Feb 2015 13:59:29 -0500 Subject: [PATCH 1/2] build: make sure our deps area is picked up for pkg-config files --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index caf345de8c..ea577b9986 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # Prefer our bundled versions of dependencies. set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies") list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}) +set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig") if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") # CMake tries to treat /sw and /opt/local as extension of the system path, but From e077f4ee99d7e24e6921b588640ccf87425f33eb Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Tue, 24 Feb 2015 14:00:02 -0500 Subject: [PATCH 2/2] build: filter off libuv from PC_LIBUV_LIBRARIES Otherwise, the -rdynamic that is being passed on the command line will require a dynamic link, even though we often want a static one. --- cmake/FindLibUV.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/FindLibUV.cmake b/cmake/FindLibUV.cmake index 62acff5dbc..d7695d2c6d 100644 --- a/cmake/FindLibUV.cmake +++ b/cmake/FindLibUV.cmake @@ -39,7 +39,11 @@ find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES} mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY) -set(LIBUV_LIBRARIES ${LIBUV_LIBRARY}) +if(PC_LIBUV_LIBRARIES) + list(REMOVE_ITEM PC_LIBUV_LIBRARIES uv) +endif() + +set(LIBUV_LIBRARIES ${LIBUV_LIBRARY} ${PC_LIBUV_LIBRARIES}) set(LIBUV_INCLUDE_DIRS ${LIBUV_INCLUDE_DIR}) # Deal with the fact that libuv.pc is missing important dependency information.