Skip to content

Commit 6d16f94

Browse files
committed
fixup
1 parent 7817ca8 commit 6d16f94

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ make_source_list(SOURCES_PROFILER
7373
lj_profile_timer.c
7474
lj_symtab.c
7575
lj_sysprof.c
76+
${LIBUNWIND_INCLUDE_DIR}
7677
)
7778

7879
# Lua standard library + extensions by LuaJIT.
@@ -278,16 +279,17 @@ target_include_directories(core_shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
278279
add_dependencies(core_static buildvm_output)
279280
add_dependencies(core_shared buildvm_output)
280281

282+
if(${LIBUNWIND_FOUND})
283+
target_link_libraries(core_static PRIVATE ${LIBUNWIND_LIBRARIES})
284+
target_link_libraries(core_shared PRIVATE ${LIBUNWIND_LIBRARIES})
285+
endif()
286+
281287
# --- Generate output ----------------------------------------------------------
282288

283289
# Compiling and linking library binaries (static, shared).
284290

285291
list(APPEND TARGET_LIBS m)
286292

287-
if(NOT LUAJIT_DISABLE_SYSPROF)
288-
list(APPEND TARGET_LIBS ${LIBUNWIND_LIBRARIES})
289-
endif()
290-
291293
set(LIB_OBJECTS_STATIC
292294
$<TARGET_OBJECTS:vm_static>
293295
$<TARGET_OBJECTS:core_static>

0 commit comments

Comments
 (0)