Skip to content

Commit 7cf2c7a

Browse files
authored
Update CMakeLists.txt
1 parent 3891302 commit 7cf2c7a

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

unittests/CppInterOp/CMakeLists.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ set(LLVM_LINK_COMPONENTS
44

55
if(EMSCRIPTEN)
66

7-
set(clang_libs
8-
clangAST
7+
set(interpreter_lib
8+
clangCppInterOp
99
)
1010

11-
foreach(l ${clang_libs})
12-
find_library(${l} NAMES ${l} HINTS ${LLVM_LIBRARY_DIRS} )
11+
foreach(l ${interpreter_lib})
12+
find_library(${l} NAMES ${l} HINTS ${CMAKE_BINARY_DIR}/lib/ )
1313
mark_as_advanced(${l})
1414
endforeach(l)
1515
endif()
@@ -26,18 +26,10 @@ add_cppinterop_unittest(CppInterOpTests
2626
VariableReflectionTest.cpp
2727
)
2828

29-
if(EMSCRIPTEN)
30-
3129
target_link_libraries(CppInterOpTests
3230
PRIVATE
33-
clangCppInterOp ${clang_libs} clangCppInterOp
31+
${interpreter_lib} ${interpreter_lib}
3432
)
35-
else()
36-
target_link_libraries(CppInterOpTests
37-
PRIVATE
38-
clangCppInterOp
39-
)
40-
endif()
4133
set_output_directory(CppInterOpTests
4234
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/CppInterOpTests/unittests/bin/$<CONFIG>/
4335
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/CppInterOpTests/unittests/bin/$<CONFIG>/

0 commit comments

Comments
 (0)