robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
036f86feac
master
1set ( LUV_CMAKE_ARGS 2-D LUA_BUILD_TYPE=System 3-D LUA_COMPAT53_DIR= ${ DEPS_BUILD_DIR } /src/lua_compat53 4-D WITH_SHARED_LIBUV=ON 5-D BUILD_STATIC_LIBS=ON 6-D BUILD_MODULE=OFF ) 7 8list ( APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE= ${ LUA_ENGINE }) 9 10if ( USE_BUNDLED_LIBUV) 11list ( APPEND LUV_CMAKE_ARGS -D CMAKE_PREFIX_PATH= ${ DEPS_INSTALL_DIR }) 12endif () 13 14list ( APPEND LUV_CMAKE_ARGS "-DCMAKE_C_FLAGS:STRING= ${ DEPS_INCLUDE_FLAGS } -w" ) 15if ( CMAKE_GENERATORMATCHES "Unix Makefiles" AND 16( CMAKE_SYSTEM_NAMEMATCHES ".*BSD" OR CMAKE_SYSTEM_NAMEMATCHES "DragonFly" )) 17list ( APPEND LUV_CMAKE_ARGS -D CMAKE_MAKE_PROGRAM=gmake ) 18endif () 19 20get_externalproject_options ( lua_compat53 ${ DEPS_IGNORE_SHA }) 21ExternalProject_Add ( lua_compat53 22DOWNLOAD_DIR ${ DEPS_DOWNLOAD_DIR } /lua_compat53 23CONFIGURE_COMMAND "" 24BUILD_COMMAND "" 25INSTALL_COMMAND "" 26${ EXTERNALPROJECT_OPTIONS }) 27 28get_externalproject_options ( luv ${ DEPS_IGNORE_SHA }) 29ExternalProject_Add ( luv 30DEPENDS lua_compat53 31DOWNLOAD_DIR ${ DEPS_DOWNLOAD_DIR } /luv 32SOURCE_DIR ${ DEPS_BUILD_DIR } /src/luv 33CMAKE_ARGS ${ DEPS_CMAKE_ARGS } ${ LUV_CMAKE_ARGS } 34${ EXTERNALPROJECT_OPTIONS }) 35 36if ( USE_BUNDLED_LUAJIT) 37add_dependencies ( luv luajit ) 38elseif ( USE_BUNDLED_LUA) 39add_dependencies ( luv lua ) 40endif () 41if ( USE_BUNDLED_LIBUV) 42add_dependencies ( luv libuv ) 43endif ()