From 08df1c63cf1af6f499cec55f2fcaf90415af38fc Mon Sep 17 00:00:00 2001 From: Mark Stemm Date: Thu, 6 Jan 2022 14:27:39 -0800 Subject: [PATCH] Clean up lyaml build a bit change LYAML_SRC to LYAML_ROOT, which points to the top source directory now. LYAML_LIB and (new) LYAML_LUA_DIR are based relative to that directory. There's no install step at all now--the static library and the .lua files are now used directly from the source tree. Signed-off-by: Mark Stemm --- cmake/modules/lyaml.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/modules/lyaml.cmake b/cmake/modules/lyaml.cmake index 94722948..a764ae15 100644 --- a/cmake/modules/lyaml.cmake +++ b/cmake/modules/lyaml.cmake @@ -11,9 +11,10 @@ # specific language governing permissions and limitations under the License. # -set(LYAML_SRC "${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml/ext/yaml") -set(LYAML_LIB "${LYAML_SRC}/.libs/yaml.a") -message(STATUS "Using bundled lyaml in '${LYAML_SRC}'") +set(LYAML_ROOT "${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml") +set(LYAML_LIB "${LYAML_ROOT}/ext/yaml/.libs/yaml.a") +set(LYAML_LUA_DIR "${LYAML_ROOT}/lib") +message(STATUS "Using bundled lyaml in '${LYAML_ROOT}'") externalproject_add( lyaml DEPENDS luajit libyaml @@ -22,7 +23,6 @@ externalproject_add( BUILD_COMMAND ${CMD_MAKE} BUILD_IN_SOURCE 1 BUILD_BYPRODUCTS ${LYAML_LIB} + INSTALL_COMMAND "" CONFIGURE_COMMAND ./configure --enable-static CFLAGS=-I${LIBYAML_INSTALL_DIR}/include CPPFLAGS=-I${LIBYAML_INSTALL_DIR}/include LDFLAGS=-L${LIBYAML_INSTALL_DIR}/lib LIBS=-lyaml LUA=${LUAJIT_SRC}/luajit LUA_INCLUDE=-I${LUAJIT_INCLUDE} - INSTALL_COMMAND sh -c - "cp -R ${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml/lib/* ${PROJECT_SOURCE_DIR}/userspace/engine/lua" )