Skip to content

Commit f0224a7

Browse files
committed
cmake: drop version in target names
Using a branch name with slashes instead of a commit hash causes problems when configuring CMake because the name cannot contain slashes. Also, there is not much sense in adding the version to the target name. So the patch removes a version of the runtime from the target name. Needed for google/oss-fuzz#14656
1 parent 24e081c commit f0224a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmake/BuildLua.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ macro(build_lua LUA_VERSION)
7373
set(LUA_LIBRARY ${PROJECT_BINARY_DIR}/lua-${LUA_VERSION}/source/liblua.a)
7474
set(LUA_EXECUTABLE ${LUA_SOURCE_DIR}/lua)
7575

76-
ExternalProject_Add(patched-lua-${LUA_VERSION}
76+
ExternalProject_Add(patched-lua
7777
GIT_REPOSITORY https://github.com/lua/lua
7878
GIT_TAG ${LUA_VERSION}
7979
GIT_PROGRESS TRUE
@@ -100,7 +100,7 @@ macro(build_lua LUA_VERSION)
100100
add_library(bundled-liblua STATIC IMPORTED GLOBAL)
101101
set_target_properties(bundled-liblua PROPERTIES
102102
IMPORTED_LOCATION ${LUA_LIBRARY})
103-
add_dependencies(bundled-liblua patched-lua-${LUA_VERSION})
103+
add_dependencies(bundled-liblua patched-lua)
104104

105105
set(LUA_LIBRARIES bundled-liblua)
106106
set(LUA_INCLUDE_DIR ${PROJECT_BINARY_DIR}/lua-${LUA_VERSION}/source/)

cmake/BuildLuaJIT.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ macro(build_luajit LJ_VERSION)
9696
set(LUA_LIBRARY ${LJ_SOURCE_DIR}/src/libluajit.a)
9797
set(LUA_EXECUTABLE ${LJ_SOURCE_DIR}/src/luajit)
9898

99-
ExternalProject_Add(patched-luajit-${LJ_VERSION}
99+
ExternalProject_Add(patched-luajit
100100
GIT_REPOSITORY https://github.com/LuaJIT/LuaJIT
101101
GIT_TAG ${LJ_VERSION}
102102
GIT_PROGRESS TRUE
@@ -127,7 +127,7 @@ macro(build_luajit LJ_VERSION)
127127
add_library(bundled-liblua STATIC IMPORTED GLOBAL)
128128
set_target_properties(bundled-liblua PROPERTIES
129129
IMPORTED_LOCATION ${LUA_LIBRARY})
130-
add_dependencies(bundled-liblua patched-luajit-${LJ_VERSION})
130+
add_dependencies(bundled-liblua patched-luajit)
131131

132132
set(LUA_LIBRARIES bundled-liblua)
133133
set(LUA_INCLUDE_DIR ${LJ_SOURCE_DIR}/src/)

0 commit comments

Comments
 (0)