Fix cling executable when building as shared-library.

This commit is contained in:
Frederich Munch 2016-07-21 18:29:10 -04:00 committed by sftnight
parent 80045a6724
commit 36e5b97051

View File

@ -9,12 +9,29 @@
# Keep symbols for JIT resolution
set(LLVM_NO_DEAD_STRIP 1)
add_cling_executable(cling
cling.cpp
$<TARGET_OBJECTS:obj.clingInterpreter>
$<TARGET_OBJECTS:obj.clingMetaProcessor>
$<TARGET_OBJECTS:obj.clingUtils>
if(BUILD_SHARED_LIBS)
set(LIBS
LLVMSupport
clingInterpreter
clingMetaProcessor
clingUserInterface
clingUtils
)
add_cling_executable(cling
cling.cpp
)
else()
set(LIBS
LLVMSupport
clingUserInterface
)
add_cling_executable(cling
cling.cpp
$<TARGET_OBJECTS:obj.clingInterpreter>
$<TARGET_OBJECTS:obj.clingMetaProcessor>
$<TARGET_OBJECTS:obj.clingUtils>
)
endif(BUILD_SHARED_LIBS)
set_target_properties(cling
PROPERTIES ENABLE_EXPORTS 1)
@ -25,8 +42,7 @@ if(MSVC)
endif(MSVC)
target_link_libraries(cling
LLVMSupport
clingUserInterface
${LIBS}
)
install(TARGETS cling