diff --git a/cmake/BuildLua.cmake b/cmake/BuildLua.cmake index 0882104..b9e27c5 100644 --- a/cmake/BuildLua.cmake +++ b/cmake/BuildLua.cmake @@ -62,12 +62,11 @@ macro(build_lua LUA_VERSION) # with -fPIC". set(CFLAGS "${CFLAGS} -fPIC") set(CFLAGS "${CFLAGS} -DLUA_USE_DLOPEN") + # `io.popen()` is not supported by default, it is enabled + # by `LUA_USE_POSIX` flag. Required by a function `random_locale()`. + set(CFLAGS "${CFLAGS} -DLUA_USE_POSIX") endif() - # `io.popen()` is not supported by default, it is enabled - # by `LUA_USE_POSIX` flag. Required by a function `random_locale()`. - set(CFLAGS "${CFLAGS} -DLUA_USE_POSIX") - include(ExternalProject) set(LUA_LIBRARY ${PROJECT_BINARY_DIR}/lua-${LUA_VERSION}/source/liblua.a)