build: luajit: set LDFLAGS on MacOS
@@ -32,12 +32,13 @@ endif()
# luajit (UNIX)
# =============
+
ExternalProject_Add(luajit
BUILD_IN_SOURCE TRUE
EXCLUDE_FROM_ALL TRUE
SOURCE_DIR ${LUAJIT_SRC}
CONFIGURE_COMMAND ./configure
- BUILD_COMMAND $(MAKE) CC=${CMAKE_C_COMPILER} ${DEPLOYMENT_TARGET} CFLAGS=${CFLAGS} BUILDMODE=static "XCFLAGS=-fPIC"
+ BUILD_COMMAND $(MAKE) CC=${CMAKE_C_COMPILER} ${DEPLOYMENT_TARGET} CFLAGS=${CFLAGS} LDFLAGS="-L${CMAKE_OSX_SYSROOT}/usr/lib" BUILDMODE=static "XCFLAGS=-fPIC"
INSTALL_COMMAND cp src/libluajit.a "${LUAJIT_DEST}/lib/libluajit.a")
# luajit (Windows)
