2023-01-20 15:48:46 -07:00
|
|
|
set(LUV_CMAKE_ARGS
|
2023-02-08 03:00:16 -07:00
|
|
|
-D LUA_BUILD_TYPE=System
|
2024-03-18 05:29:24 -07:00
|
|
|
-D LUA_COMPAT53_DIR=${DEPS_BUILD_DIR}/src/lua_compat53
|
2023-02-08 03:00:16 -07:00
|
|
|
-D WITH_SHARED_LIBUV=ON
|
|
|
|
-D BUILD_STATIC_LIBS=ON
|
|
|
|
-D BUILD_MODULE=OFF)
|
2016-04-10 19:49:23 -07:00
|
|
|
|
2024-01-01 05:08:56 -07:00
|
|
|
list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=${LUA_ENGINE})
|
2019-07-09 12:55:01 -07:00
|
|
|
|
2018-05-27 02:16:29 -07:00
|
|
|
if(USE_BUNDLED_LIBUV)
|
2023-03-02 14:50:43 -07:00
|
|
|
list(APPEND LUV_CMAKE_ARGS -D CMAKE_PREFIX_PATH=${DEPS_INSTALL_DIR})
|
2018-05-27 02:16:29 -07:00
|
|
|
endif()
|
|
|
|
|
2023-11-19 18:01:39 -07:00
|
|
|
list(APPEND LUV_CMAKE_ARGS "-DCMAKE_C_FLAGS:STRING=${DEPS_INCLUDE_FLAGS} -w")
|
2023-01-22 10:02:02 -07:00
|
|
|
if(CMAKE_GENERATOR MATCHES "Unix Makefiles" AND
|
|
|
|
(CMAKE_SYSTEM_NAME MATCHES ".*BSD" OR CMAKE_SYSTEM_NAME MATCHES "DragonFly"))
|
2023-02-08 03:00:16 -07:00
|
|
|
list(APPEND LUV_CMAKE_ARGS -D CMAKE_MAKE_PROGRAM=gmake)
|
2016-04-10 19:49:23 -07:00
|
|
|
endif()
|
|
|
|
|
2024-03-18 04:23:53 -07:00
|
|
|
get_externalproject_options(lua_compat53 ${DEPS_IGNORE_SHA})
|
2024-03-18 05:29:24 -07:00
|
|
|
ExternalProject_Add(lua_compat53
|
|
|
|
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua_compat53
|
2022-08-29 07:57:46 -07:00
|
|
|
CONFIGURE_COMMAND ""
|
|
|
|
BUILD_COMMAND ""
|
2023-11-20 04:42:54 -07:00
|
|
|
INSTALL_COMMAND ""
|
|
|
|
${EXTERNALPROJECT_OPTIONS})
|
2016-04-10 19:49:23 -07:00
|
|
|
|
2024-03-18 04:23:53 -07:00
|
|
|
get_externalproject_options(luv ${DEPS_IGNORE_SHA})
|
2023-05-13 03:12:29 -07:00
|
|
|
ExternalProject_Add(luv
|
2024-03-18 05:29:24 -07:00
|
|
|
DEPENDS lua_compat53
|
2022-08-29 07:57:46 -07:00
|
|
|
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/luv
|
2022-09-29 12:46:14 -07:00
|
|
|
SOURCE_DIR ${DEPS_BUILD_DIR}/src/luv
|
2023-01-25 06:36:17 -07:00
|
|
|
CMAKE_ARGS ${DEPS_CMAKE_ARGS} ${LUV_CMAKE_ARGS}
|
2023-11-20 04:42:54 -07:00
|
|
|
${EXTERNALPROJECT_OPTIONS})
|
2016-04-10 19:49:23 -07:00
|
|
|
|
2017-03-25 16:22:15 -07:00
|
|
|
if(USE_BUNDLED_LUAJIT)
|
2023-05-13 03:12:29 -07:00
|
|
|
add_dependencies(luv luajit)
|
2022-08-12 08:59:40 -07:00
|
|
|
elseif(USE_BUNDLED_LUA)
|
2023-05-13 03:12:29 -07:00
|
|
|
add_dependencies(luv lua)
|
2017-03-25 16:22:15 -07:00
|
|
|
endif()
|
|
|
|
if(USE_BUNDLED_LIBUV)
|
2023-05-13 03:12:29 -07:00
|
|
|
add_dependencies(luv libuv)
|
2017-03-25 16:22:15 -07:00
|
|
|
endif()
|