CMake: fix USE_BUNDLED_LIBUV

Closes #5114.
This commit is contained in:
David Personette 2016-07-25 08:08:24 -04:00 committed by Marco Hinz
parent fbb2cd791d
commit 67062d20ed
No known key found for this signature in database
GPG Key ID: AC9D48E91BCF448C

View File

@ -142,9 +142,13 @@ if(USE_BUNDLED_BUSTED)
if(MINGW AND CMAKE_CROSSCOMPILING)
set(LUV_DEPS ${LUV_DEPS} libuv_host)
endif()
set(LUV_ARGS CFLAGS='-O0 -g3 -fPIC')
if(USE_BUNDLED_LIBUV)
set(LUV_ARGS LIBUV_DIR=${HOSTDEPS_INSTALL_DIR} CFLAGS='-O0 -g3 -fPIC')
endif()
add_custom_command(OUTPUT ${HOSTDEPS_LIB_DIR}/luarocks/rocks/luv
COMMAND ${LUAROCKS_BINARY}
ARGS make ${LUAROCKS_BUILDARGS} LIBUV_DIR=${HOSTDEPS_INSTALL_DIR} CFLAGS='-O0 -g3 -fPIC'
ARGS make ${LUAROCKS_BUILDARGS} ${LUV_ARGS}
WORKING_DIRECTORY ${DEPS_BUILD_DIR}/src/luv
DEPENDS ${LUV_DEPS})
add_custom_target(luv